Jump to content

Position prediction


Recommended Posts

Hi.

Im trying to predict some element position in future ( after 1 second).

Gta returns velocity in meters per 1/50 seconds, so i need ot confirm my calculation.

Is this right way?

x, y, z = getElementPosition ( element )

sX, sY, sZ = getElementVelocity ( element )

-- Find predicted position after 1 second

-- rich velocity in meters pre second ( not 1/50 second )

sX = sX * 50

sY = sY * 50

sZ = sZ * 50

-- predicted position. "1" is 1 second here, added it just to show

predictedX = x + sX * 1

predictedY = y + sY * 1

predictedZ = Z + sZ * 1

Is this correct way to find element position after 1 second?

Thanks!

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...