Post

 Resources 

Console


RE: Angle problems using radians Rag on a Stick (4 replies, 0 views) (2000-Sep-27)
-
LEARN TRIG =) In a right angled triangle, Tan(Angle) is equal to the length of the opposite side over (divided by) the adjacent side: <tt> <pre> /| The Player / | / | / O / P / P / | --ADJ--| ^ The angle (The enemy is here) </pre> </tt> So: Tan(TheAngleYouWant) = (Y2 - Y1) / (X2 - X1) Where X1, Y1 is the player and X2, Y2 is the enemy. so: Angle = Atn((Y2 - Y1) / (X2 - X1)) Then convert it to radians Angle = Angle * (Pi / 180) And you might want to put (Pi / 180) as a constant.


-
Up One Level | Back to Forum

The ascii art kinda stuffed up... Rag on a Stick (2 replies) (2000-Sep-27)
Noooooooo... One more try:... Rag on a Stick (1 reply) (2000-Sep-27)
Woohoo, it worked... Rag on a Stick (0 replies) (2000-Sep-27)
thank you !!! Stuart Zahn (0 replies) (2000-Sep-27)

Copyright © 2002 - 2004 Eric Coleman, Peter Kuchnio , et. al.
There have been 107 visitors within the last 20 minutes
RSS News Feed