kurisusan
11-06-2010 11:38:36
Hi I am having an issue where I reorientate an body (call it bodyA) every frame to look at the closest body to it (call it bodyC).
I get the location of the closest body and set the orientation to its current location. This works fine, however when the next frame starts and the advance method is called on the timecontroller, I noticed that the linear velocity of bodyA starts to increase and bodyA starts to slowly move to bodyC. Every frame the linear velocity increase by a small amount. If I stop reorientating bodyA towards its closest body though the velocity is set back to 0.
Has anyone ever encountered this before? Is it something to do with how setGlobalOrientation works?
Please any help would be much appreciated.
I get the location of the closest body and set the orientation to its current location. This works fine, however when the next frame starts and the advance method is called on the timecontroller, I noticed that the linear velocity of bodyA starts to increase and bodyA starts to slowly move to bodyC. Every frame the linear velocity increase by a small amount. If I stop reorientating bodyA towards its closest body though the velocity is set back to 0.
Has anyone ever encountered this before? Is it something to do with how setGlobalOrientation works?
Please any help would be much appreciated.