Page 1 of 1

4 Directions

PostPosted: Sat Apr 15, 2006 1:23 am
by Joshua Worth
I can find the direction between 2 points, but how would I turn that into 4 directions. eg. 0 - up, 1 - right, 2 - down, 3 - left.

Ill tell you what I am going to use it for after I get an answer... :D

PostPosted: Sat Apr 15, 2006 6:36 pm
by makslane
Use the returned angle in the direction function:

45 - 135: up
135 - 225: left
225 - 315: down
315 - 45: right