Getangle: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
Chibi (talk | contribs)
No edit summary
 
Plugwash (talk | contribs)
No edit summary
Line 1: Line 1:
getangle <x> <y>
getangle <x> <y>


Get's the angle to the <x> and <y> coordinates.
Get's the angle formed by the displacements <x> and <y>. In most languages this function is known as arctan2.  


NOTE: A little bit of math is involved, I think, to make it face another actor, see [[make one actor face another]] in the examples.
NOTE: To make one actor face another some subtraction is involved. see [[make one actor face another]] in the examples.

Revision as of 18:08, 30 August 2005

getangle <x> <y>

Get's the angle formed by the displacements <x> and <y>. In most languages this function is known as arctan2.

NOTE: To make one actor face another some subtraction is involved. see make one actor face another in the examples.