Skip to content

Instantly share code, notes, and snippets.

@bramreth
bramreth / Godot4FPS.gd
Last active June 22, 2025 08:18
The code for a first person movement youtube tutorial in Godot 4
extends CharacterBody3D
const SPEED = 5.0
const JUMP_VELOCITY = 4.5
# Get the gravity from the project settings to be synced with RigidDynamicBody nodes.
var gravity: float = ProjectSettings.get_setting("physics/3d/default_gravity")
@onready var neck := $Neck
@onready var camera := $Neck/Camera3d