New answers tagged

1

Myself, I'd attack it a little something like this: public enum Direction { Down, Left, None, Right, Up } public static DirectionFromTo(Vector2 from, Vector2 to) { Vector2 offset = to - from; Vector2 absolute = new Vector2(Abs(offset.x), Abs(offset.y)); // In your code, it looks like you have a fudge factor to ignore ...


Top 50 recent answers are included