✅ Console FPS Player Direction

I am making a math error in the following code: https://gist.github.com/ZacharyPatten/e071bfefd00f82c8ad719e53fb561d5a

NOTE: this is a fork/reimplementation of: https://github.com/OneLoneCoder/CommandLineFPS/blob/master/CommandLineFPS.cpp

The code is mostly working, however, something is off and I haven't quite spotted it yet. When you hold the 'A' key, you are supposed to be turning left, however, the player icon in the minimap (< ^ > v) are rotating clockwise instead of counterclockwise (inversed). The same is true for holding the 'D' key as the icons rotate clockwise instead of counterclockwise. However the direction in the minimap appears to be accurate because the 'W' key always moves you in the direction you are facing.

I'm wondering if this was a bug in the original code or something I added when I translated it from C++ to C#. 🤔 The original code just had a "P" in the minimap (not < ^ > v) for the player; it did not include player direction in the minimap.
Was this page helpful?