Jump to content

Offset to XYZ coords


Recommended Posts

i stored coords from a car

and i want to know whether one of the coords is X+ or X-, how do i do it?

i want something like that:

 

store coords from car

 

check coords as XYZ

 

car velocity at direction XYZ by coords

 

the problem is

when i try to use store coords and then velocity at direction

i dont know which velocities to use

so i use 1.0 1.0 1.0

and then it moves everywhere, left, forward, up

so how do i know what velocities to use?

based on XYZ

 

i hope you understand any of this

cheers

Link to comment
https://gtaforums.com/topic/459098-offset-to-xyz-coords/
Share on other sites

 

i dont know

got knows i tried

i just cant think of something

i dunno if there is any connection between offsets and XYZ coords

store coords from car returns absolut coords of the coords system

but the velocity opcode requires floats in relation to the car, similar like these which you regulary insert in the offset params

you can get it by reading z-angle and calculate it with sine and cosine, then multipicate the result of cosine with -1.0

Link to comment
https://gtaforums.com/topic/459098-offset-to-xyz-coords/#findComment-1060124653
Share on other sites

  • 2 weeks later...

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
  • 0 User Currently Viewing
    0 members, 0 Anonymous, 0 Guests

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.