hi i have a physical simulation (with ODE) running on a server. the client receives 'physical body updates' every once in a while (say every 1 sec or so). a 'body packet' contains timestamp, position, orientation, linear and angular velocity. in the client, while waiting for the next packet, i try to predict how the body is moving with this:
correction = (lastPacket.LinearVelocity*dt) + (0.5f * acceleration * (dt*dt))
currentPosition = lastPacket.Position + correction
this works ok only when the body is moving in a straight line. my problem is i fail to predict position on a curved motion. the simplest test i've made is having the body running in circle on a plane. so, assuming is only rotating on the y vector, i've tried something like this:
q = Quaternion.FromAxisAngle(Vector.UnitY, lastPacket.AngularVelocity.y*dt)
currentPosition = lastPacket.Position + (q * correction)
it doesn't seems right. predicted body is very different from the real one. what i'm doing wrong?