Original Post
🔒 Locked
Object Prediction
Advertisement
Quote:
Original post by coplaner
P(t) = P(t0) + v*tP(t) = P(t0) + v*t + 0.5 * a * t2
Is this formula correct?
When trying to add latency correction, should I just add ping time to t?
Should velocity and position be an array then averaged?
Its not quite right. First, I think you just goofed in typing the equation since the middle part, P(t0) + v*tP(t) is just flat out wrong. The last part, P(t0)+v*t + 0.5*a*t2 (I assume you meant to superscript the 2) is almost, but not quite correct. Should be:
P(t) = P(t0) + v(t0)*t + 0.5*a*t<sup>2</sup>This is correct, but keep in mind that is correct for the following conditions: a) t = current_time - t0; and, b) a is assumed to be constant, which is probably a fair assumption for prediction when latency is fairly small. The current_time is the time when you want to estimate the position.
I'm not a networked physics expert, so I won't try to add more than this by commenting on ping time, network latency, etc., :).
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement