https://github.com/mogita/godot-humanoid-controller
https://github.com/mogita/godot-humanoid-controller
3d character-controller godot
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mogita/godot-humanoid-controller
- Owner: mogita
- License: cc0-1.0
- Created: 2024-09-01T13:58:41.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-01T15:58:17.000Z (over 1 year ago)
- Last Synced: 2025-04-06T06:31:21.872Z (about 1 year ago)
- Topics: 3d, character-controller, godot
- Language: GDScript
- Homepage:
- Size: 9.37 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Godot Humanoid Controller
A simple humanoid character controller with state machine and animation tree for Godot Engine 4.3 and above.
This repository is reserved for my ease of development and references. You can use it freely for personal or commercial purposes under CC0 license (but you might want to pay attention to Mixamo animations or bring your own animations).
## What It Does
- Run, walk, jump whatsoever
- State Machine for code separation
- Animation Tree for blending animations
- Spring Arm for camera control
## Setup Checkpoints
When copying and pasting the player controller to a new project, make sure to go through these checkpoints:
- Go to Project -> Project Settings -> Input Map, add the following actions (some might not be in use but could be referenced by physics functions):
- `forward`
- `backward`
- `left`
- `right`
- `jump`
- `walk`
- `roll`
- `move_left`
- `move_right`
- `mouse_left`
- `mouse_right`
- `cam_zoom_in`
- `cam_zoom_out`
- Navigate to `Player` node on the level (`demo_scene` in the current project for example), make sure `player.gd` is attached to the script property
- Navigate to the `state_manager` node in the `Player` scene, expand it and check the following default values:
- walk: `Movement Speed`: 2
- run: `Movement Speed`: 6.5
- jump: `Jump Time to Peak`: 1; `Jump Time to Descent`: 10000; `Jump Movement Speed`: 3
- roll: `Roll Time`: 0.4
- Navigate to the `AnimationTree` node in the `Player` scene, edit the animations of each state as needed, while MUST set the `Advance -> Condition` of each transition, thus the Animation Tree can form a list of all the conditions that could be triggered by the state machine
- Navigate to the `state_manager` node in the `Player` scene, expand it and check each "Animation Name" values, they connect a state to an animation "condition" in the Animation Tree
## Credits
- [Godot Engine](https://godotengine.org/)
- [Kaykit](https://kaylousberg.itch.io/kaykit-dungeon-remastered) for the floor and props model
- [Mixamo](https://www.mixamo.com) for the character animations
- Character model and texture made by LooieJones
## License
- [CC0-1.0](LICENSE)
- Mixamo animations are used under the [Mixamo license](https://community.adobe.com/t5/mixamo-discussions/mixamo-faq-licensing-royalties-ownership-eula-and-tos/td-p/13234775). Please credit Mixamo when using these animations in your projects.