Planetoid Player Controller

In the 3D custom engine I made, I implemented a player controller that uses some of the information from my collision system in order to orient the player correctly on a “planetoid” surface. The key was to write a movement logic that would work with any surface normal I could give it, no matter what direction that normal is in.

In the screen capture above, you can also notice that the player has a 2D sprite that orients itself based on the current relationship between the direction that the player is facing and the direction that the camera is facing. The player can also press the arrow keys to rotate the camera around the Y axis.