Skip to content
Simple FPS camera for Godot
Branch: master
Clone or download
tavurth Merge pull request #4 from tavurth/bugfix/mouse-locked
Fixed an issue with the mouse being captured and not released
Latest commit f29d76a Apr 22, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore Initial commit Sep 8, 2018
Camera.gd
ExitHelp.gd Fixed an issue with the mouse being captured and not released Apr 22, 2019
FPSCounter.gd Renamed label to FPS counter Sep 8, 2018
LICENSE.txt Added a license Sep 8, 2018
README.org Spelling Feb 26, 2019
World.tscn Fixed an issue with the mouse being captured and not released Apr 22, 2019
default_env.tres Fixed an issue with the mouse being captured and not released Apr 22, 2019
icon.png
project.godot Fixed an issue with the mouse being captured and not released Apr 22, 2019
screenshot.png

README.org

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.

Requirements:

Ideas

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.

Screenshots

screenshot.png

You can’t perform that action at this time.