Page 1 of 1

Moving an entity without forces?

Posted: Mon Apr 08, 2013 12:37 pm
by chebob69
I realise the best way to move a physics entity in most engines is to stick to applying forces or impulses, like with the character controller.
I'm not sure that'd best suit my current needs though. I need a box (or something equivalent) to effectively stick to one of my models in xna. So I'd need to be just be setting the position of the box each frame. Will this be a problematic approach?

Re: Moving an entity without forces?

Posted: Mon Apr 08, 2013 5:21 pm
by Norbo
Setting the position/orientation will cause the entity to teleport. Since collision response relies on velocities and teleportation involves no velocities, collision response will be very 'squishy' for objects colliding with the teleporter.

If you don't care about collision response for the teleporter, it will work fine.

Using a kinematic entity and setting its velocities such that it reaches the goal state in the next frame would also work. Kinematic entities do have infinite inertia, though, so they would piledrive their way through any obstacles to reach their goal.

Re: Moving an entity without forces?

Posted: Mon Apr 08, 2013 10:41 pm
by chebob69
In my particular situation, collision response for the box isn't an issue at all so teleporting will work fine.

Cheers Norbo.