They are probably world values. To get local values from the world values you just have to project the velocity vectors on the up, right and forward vectors, in EGate 2 that would be:
Vel = vec(WorldX,WorldY,WorldZ)
LocalX = -Vel:dot(entity():forward())
LocalY = Vel:dot(entity():right())
LocalZ = Vel:dot(entity():up())
I have no idea why X is to the back and Y to the right, but that's how I had to calculate it to make it work in my flying system.


LinkBack URL
About LinkBacks




Reply With Quote





Bookmarks