Hi all,
I have a question about client side interpolation.
Say Object A has postion V1, and a update comes in, his position is changed to V2 during a time of X ms.
What is the best way to "recreate" this movement with interpolating the vectors?
-Diho
Client interpolation
Re: Client interpolation
Using a straightline or spline approximation?
Re: Client interpolation
I guess just a straight line.
Re: Client interpolation
(1 - x)*V1 + x*V2 as x goes from 0 to 1. The speed of Object A (assuming it isn't warping!) is 1000*sqrt(dot((V2 - V1), (V2 - V1)))/X. But you can't change the past, so you need to get A to its next position. So set V2' = 2*V2 - V1. And maybe make it go a little bit faster. You should really always be heading to where A will be at the next update, not where it should be for this update. You use feedback to keep it on course. If it gets too far away, you should just warp it, or write better code.