yair1221 Posted September 13, 2010 Share Posted September 13, 2010 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 More sharing options...
TheSiggi Posted September 13, 2010 Share Posted September 13, 2010 Is it realy that hard to write a simple test script for that? finding out stuff yourself will definately make you understand it Link to comment https://gtaforums.com/topic/459098-offset-to-xyz-coords/#findComment-1060124413 Share on other sites More sharing options...
Deji Posted September 13, 2010 Share Posted September 13, 2010 What he said. Link to comment https://gtaforums.com/topic/459098-offset-to-xyz-coords/#findComment-1060124424 Share on other sites More sharing options...
yair1221 Posted September 13, 2010 Author Share Posted September 13, 2010 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 Link to comment https://gtaforums.com/topic/459098-offset-to-xyz-coords/#findComment-1060124441 Share on other sites More sharing options...
ZAZ Posted September 13, 2010 Share Posted September 13, 2010 i dont knowgot 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 More sharing options...
yair1221 Posted September 14, 2010 Author Share Posted September 14, 2010 ok... but i still dont understand the deal with sine and cosine...something about taking 50.0 of them both than adding them? Link to comment https://gtaforums.com/topic/459098-offset-to-xyz-coords/#findComment-1060124985 Share on other sites More sharing options...
IGreyFox Posted September 24, 2010 Share Posted September 24, 2010 its a standar mathematic operation... you really need to back school men lol basically he is calculating the z-angle with sine/cosine operations, read it again you have to understand it Link to comment https://gtaforums.com/topic/459098-offset-to-xyz-coords/#findComment-1060138283 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now