Are there any specific units that things such as Velocity are given in?
I'm getting VelocityX, VelocityY and VelocityZ. I can see that in this world space Y is up and down so I'm going to ignore it. Getting the magnitude of the XZ vector with the following code.
Quote:var speed = Math.Sqrt((packet.VelocityX * packet.VelocityX) + (packet.VelocityZ * packet.VelocityZ));
Im driving in a straight line I can see my X and Y are near zero, and Z is 52. That is the same value as the speed value above so I believe the math is correct. I'm just confused what this means. I was testing in a NASCAR and keeping it in second gear. If I set my game to mph units I get around 117 display in game. If I set it to metric units I get 189. In both cases the speed variable from the UDP is around 52. Am I meant to multiple by something here?
EDIT: Wiring up my response I wondered what other measurements exist. It's meters per second. Makes perfect sense.
Edited by user Saturday, July 28, 2018 4:22:32 PM(UTC)
| Reason: Not specified