Page 1 of 1

how to the reposition of body

Posted: Sun Sep 04, 2011 8:58 am
by adams
Dear all:
I have a problem that I want to reposition of the body during some frame in the game.And how can I do it. Someone has good ideas?

Re: how to the reposition of body

Posted: Sun Sep 04, 2011 9:27 pm
by slembcke
If you just want to "teleport" it occasionally, you can just directly set the position of the object. Setting the position of the body only becomes a problem when you keep doing it every frame.

Re: how to the reposition of body

Posted: Mon Sep 05, 2011 4:06 am
by adams
slembcke wrote:If you just want to "teleport" it occasionally, you can just directly set the position of the object. Setting the position of the body only becomes a problem when you keep doing it every frame.
Hi!But I always need to change the body's poision,how can I to do it ? Do have some good ideas?

Re: how to the reposition of body

Posted: Mon Sep 05, 2011 12:14 pm
by slembcke
Then you need to make the body have infinite mass and moment of inertia and update both the position and velocity.