Manually moving statics

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
Senlaar
Posts: 12
Joined: Mon Jun 22, 2020 6:11 am

Manually moving statics

Post by Senlaar »

Hello!

If I move a static by directly editing it's Pose.Position, will it impart force on dynamics it comes into contact with? Or does the simulation need to be controlling movement for such force to be created? (Simplest concrete example for clarity: if a dynamic sphere is on top of a static flat ground, and I move the ground upwards by editing its Pose, will the sphere rise as well to stay on top?) Thanks!
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Manually moving statics

Post by Norbo »

Setting a position is equivalent to teleportation- there is no velocity component, so things will only move out of the way due to penetration recovery. If the ground teleported up a little bit (and the affected bodies are awake), they would scoot up a bit in response to get out of penetration. If the ground shot 30 feet above the bodies, the bodies would just fall into the void since the ground didn't move continuously from A to B, it just poofed.

If you want the proper dynamic response, a kinematic body moved by setting the velocity would work.
Senlaar
Posts: 12
Joined: Mon Jun 22, 2020 6:11 am

Re: Manually moving statics

Post by Senlaar »

Makes perfect sense, thanks!
Post Reply