Simple FPS camera
by tavurth
Simple FPS camera
Web Demo (3.x) ←←←←
https://user-images.githubusercontent.com/100964/153240320-7fad22ed-8840-4f54-9ee1-8af7421e9767.mp4
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.
Requirements:
- Godot 3.x
For Godot 4.2 and higher, please see the "master" branch
Ideas
Camera rotation
The main idea I'd like to represent here is splitting the X rotation and Y rotation.
We use a parent node "Player", and a child node "Camera". 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.
Player model
The player model was loaded as a .glb
file with animations. The animations were downloaded from mixamo.com.
Then an AnimationTree was created and you can explore the two AnimationBlend1D which are used for moving and strafing.
Download
Support
If you need help or have questions about this plugin, please contact the author.
Contact Author