ID:160397
Sep 17 2008, 1:25 pm
|
|
I really regret posting this, but i've been looking for awhile and can't find it. How would you go about getting an exact direction instead of BYOND's built in crappy get_dir? I think i've seen it before but I can't find it, so either a link or an answer will be nice ^^.
|
Sep 17 2008, 1:31 pm
|
|
You'll have to clarify "exact direction," and why get_dir() is crappy. I don't seem to recall having problems with get_dir(); get_dist() can be bettered with the Pythagorean Theorem, but that hardly has anything to do with get_dir().
|
In response to Kuraudo
|
|
get_dir() will only return NORTH if the second location is directly above them, if it is say 6 spaces above and one space to the right then it will be NORTHEAST, while in reality is closer to NORTH.
So i'm saying rounding off to the closest direction since BYOND doesnt use 360 of them. |
proc/getAngle(atom/source, atom/destination) Something along those lines is what you would want. That can probably be done a lot more efficiently. I just spewed out the first thing that came to mind. |