A first-person character controller with an FSM, inspired by the Thief games and Quadrilateral Cowboy.
Made in and for the Godot engine.
- Clambering up ledges and into vents.
- Detects how lit the player is.
- Get the texture of the surface walked on and signal to nearby listeners in a radius.
- Head bobbing
- Crouching
- Sneaking
- Leaning
- Frobbing (Interacting)
- Dragging and throwing rigidbodies with the mouse.
To detect the player visually, have the AI access the player light_level variable. To detect the player by sound, add a listen function to the AI script. To make an object frobbable, add an on_frob function to the object script. To make an object draggable, simply have it be a Rigidbody with a collider.
-
Move with WASD.
-
Crouch by holding C.
-
Lean by holding E and pressing A and D.
-
Sneak by holding Shift.
-
Clamber and jump by pressing space.
-
Frob and drag by clicking the Left Mouse Button.
-
Throw when dragging by clicking the Right Mouse Button.
Uses the light detection method from The Dark Mod, as documented here.
Clambering code inspired and adapted from Quadrilateral Cowboy by Blendo Games. (Source)