Simple FPS camera
A FPS camera made for the purposes of teaching others GDscript and godot.
The purpose of this demo is to show how to create a camera in a simple way. You are free to use, modify and merge this in whatever way you like.
- Godot 3.x
The main idea I’d like to represent here is splitting the X rotation and Y rotation.
We use a parent node Yaw, and a child node. The parent node takes care of the left and right rotation, while the child node takes care of vertical rotation.
If we simply try to rotate the child node in first the X and then the Y directions we’d end up with a sort of flight-simulator camera, where we can roll left and right rather than turning left and right.