Camera Alignment Keys WITHOUT Forking PlayerModule

Hello players and developers alike,

If you were an avid obbygoer, or had a laptop and didn’t like using the arrow keys in-game, you were probably disappointed to find out that on Oct 3, 2019, Roblox removed the old camera alignment keys:

This was a legacy feature Roblox left in the engine for a very long time, so people got used to using it. Presumably, it was removed to make room for the Emotes menu which opens when you press the period key in many experiences.

The way they worked was that

  • the period and comma keys would rotate the camera along 45 degree angle brackets relative to world space, counterclockwise and clockwise respectively when viewed from above, and
  • the PageUp and PageDown keys would rotate the camera 15 degrees up or down respectively, relative to the current camera angle.

The common solution since its removal has been to simply fork the camera using the old PlayerModule that contained the old controls. This is bad practice, as any future updates Roblox makes for the camera will not be realized in any games utilizing forked code like this.

Per @B1GEY3DPYTH0N’s request and my own free time, I decided to make my own camera alignment keys working completely outside of the default player scripts. I couldn’t really figure out how the old code worked, as it seemed heavily math-involved and hardwired into the camera itself, so I made my own completely separate solution.

Get it here: Camera Alignment Keys - Roblox

Read the model’s description for the multiple ways you can install it.

Special thanks to @tyzone for helping with the horizontal rotation functionality + solving an edge case with the vertical rotation.

30 Likes