0 Replies Latest reply on Jan 11, 2007 1:50 PM by Skavengur

    Need Momentum(Havok) to reference camera rotation

      Using Havok, I have a ball rolling on a surface, with the camera following it and rotating on the y axis when the left and right (which turns a dummy box at the same position of the ball). This is working "somewhat" until the ball's momentum builds up. If I then turn, of course the camera is no longer following "behind the ball". I've gotten a temporary fix by reducing the ball's momentum a fraction every frame, but this kills the physics that I'm wanting to integrate(rolling down hill, ect). Here's what I'd like to do:

      When the camera rotation changes (by whatever means), the ball's momentum is set to match the camera's rotation, keeping the current momentum(velocity*mass) - not losing the benefit of Havok physics and keeping the camera behind the ball, no matter what the ball's rotation is. I guess I don't have the knowledge of vector based math to get the converted. Does anyone have a clue how to achieve this? I'm not exactly looking for code, bu the concept itself eludes me...though code is always nice :-)

      thanks all!