A very simple and basic FPS controller for use in the godot game engine
Download both the Kinematic_actor.gd script and the Kinematic_actor.tscn file into your godot project's directory, then drag and drop the Kinematic_actor.tscn node into your level scene and run.
-
Click the
Project
tab at the top of the Godot editor and clickProject Settings
A window with additional dialog should open up. -
Navigate to the
Input Map
tab and use the dialog box at the top of the page (labeledAction
) to type "move_forwards", then click the button at the far right of the dialog labeledAdd
to add the Action to the list of Actions. You should now see this action at the bottom of the list, you may need to scroll down -
Click the
+
symbol on the far right of themove_forwards
column and selectKey
from the dropdown menu A dialog labeled "Please Confirm" should pop up prompting you to press a key -
Press a key in order to map it to that action You should see that key appear just below the column along with a symbol, you may repeat step 3 if you wish to map
move_forwards
to more than one key -
Repeat steps 2-4 with the following actions
move_backwards
move_left
move_right
- Find
kinematic_actor.tscn
inside of the Godot FileSystem tab (by default this will be in the far-left corner) and double-click it to open the scene editor - Click the root node
kinematic_actor
and look for theAlternative Input Map
variable exposed in the editor - Replace the
move_forwards
,move_backwards
,move_left
,move_right
with single character strings representing the keys on the keyboard you want to map the input to