My player has a position (vec3), rotation (quaternion) and speed.

I have a fixed time step. At each tick, I work out from key-state etc what rotation and speed adjustments to make.

How do I now compute the new position?

And how, for the graphics which run at a different framerate, do I compute the the tweening for smooth movement?


(Rotation*Vector3::Forward).Normalize() * move_speed * dt

dt - time elapsed since last frame Vector3::Forward - direction to move relative to current rotation.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.