21.01.2014, 14:31
How do I calculate the GTA cords from objects/car offsets?
For example how do I calculate the GTA cords from this offset: 1.051757,-2.713012,-0.012840 if the cars GTA cords are: -1377.2820,-256.9163,14.0373,328.7105
I have tried something like this:
x += (tmpX * floatsin(-angle, degrees));
x += (tmpX * floatcos(-angle, degrees));
y += (tmpY * floatsin(-angle, degrees));
y += (tmpY * floatcos(-angle, degrees));
But it didn't work.
For example how do I calculate the GTA cords from this offset: 1.051757,-2.713012,-0.012840 if the cars GTA cords are: -1377.2820,-256.9163,14.0373,328.7105
I have tried something like this:
x += (tmpX * floatsin(-angle, degrees));
x += (tmpX * floatcos(-angle, degrees));
y += (tmpY * floatsin(-angle, degrees));
y += (tmpY * floatcos(-angle, degrees));
But it didn't work.