I just want the angle between the player and the mouse!
So it' now:
ATan((Y( "player" )-Y( "mouse" ))/(X( "player" )-X( "mouse" )))*180/3.14159
It Still doesn't work.
I can upload the file if anyone cares to take a look.
Edited by the Author.
Peblo Custom ratings must be 50 characters or less
Registered 05/07/2002
Points 185
16th March, 2007 at 02:57:12 -
Check your parentheses.
"Isn't it always amazing how we characterize a person's intelligence by how closely their thinking matches ours?"
~Belgarath
Thanks for the help so far
Using what you just said Peblo, minus the *180/3.14159 bit works for 180 degrees but the other (left side) arc doesn't work :/
Times it by two I and get full 360 degrees but at twice the rate it should be going.
Don't have mmf2.
But, if you want to find all possible angles, you simply subtract or add 180° to the retrieved value.
Only do this between values of -360 and 360.
For negative angles, just do 360-magnitude of angle retrieved (for example, if you have -30 degrees, subtract 30 from 360 and you will get 330 degrees, i.e that is to say the same angle can be retrieved by travelling 360 anti clockwise from the point of calculation)