What's the formula for a var that returns the degrees in a full rotation from Point A(src) to Point B(src.target) using trigonometry in the DM language?
Heh.
ID:168962
Aug 9 2005, 8:58 pm
|
|
In response to Jp
|
|
Uh, yeah, I mean I need to get the Direction Point B is from Point A.
That formula doesn't work, by the way... At least not the way I tried it, it might do if I did it right... var/deg = sin(abs(src.y-src.target.y) / (get_dist(src,src.target))) |
Otherwise, use a bit of right angle trig:
sin d = abs(a.y-b.y) / (distance between a and b)
Where d is the angle. You get that from right angle trigonometry.