Cogito-StateMachine #509
Replies: 6 comments 4 replies
-
|
Oh, will take a look at this! (Thanks for linking the course! ChaffGames' videos and tutorials helped me learn Godot so I definitely want to check that out. Also really appreciate you mentioning on how you used AI, I think the disclosure is important so people can make their own calls for this.) With more player controllers floating around out there, I think at some point we might have different/separate player controllers for Cogito as their own repos/plugins or something. While I do want to improve the currently implemented player controller at some point (and @mrezai has also been working really hard on it), I know there'll always be different approaches. |
Beta Was this translation helpful? Give feedback.
-
|
The state machine i've implemented works very well. The animation_controller.gd is not ready and needs work. I'd love to see this state machine added to cogito if you and others like it as I think it would be a great add for cogito. it's always easier to make updates when you just have to focus on updating a single state, plus i separated all the motion pieces which the states extend from. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
@Phazorknight I fixed the jump (was easy to fix) and tried to fix the camera but I can't get it perfect (there are new exposed variables) @luiscarloscontreirassilvestre-art my git is updated. third person camera is only to show the animations for testing. The latest comment talks about what i added. redhwk/Cogito-StateMachine@d32ae5a I doubt I will change much as I want to focus on my game. |
Beta Was this translation helpful? Give feedback.
-
|
Done: Migrated to CodeBerg https://codeberg.org/Redhawkish/Cogito-StateMachine and opened a new issue https://codeberg.org/Phazorknight/Cogito/issues/516. |
Beta Was this translation helpful? Give feedback.
-
|
The problem might be with the camera's gdscript, which I'm not yet aware of.
|
Beta Was this translation helpful? Give feedback.



Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
### This document has high-level details of what I did. https://github.com/redhwk/Cogito-StateMachine/blob/main/RedHawkish-Notes.txt
I'm not sure how to create a Pull Request to share, so I just created a new repository. I downloaded Cogito 1.1.5-rc on 12/31/2025 which was 26 commits ahead of main (latest add was CigtoNPC: Added player look-at). I'm mimicing what @mrezai did, but I'm not using StateCharts.
This is a custom state machine that can be owned by the Cogito team. I created the state machine based on learnings from this Udemy course (https://www.udemy.com/course/godot-4-create-a-third-person-shooter-controller/learn/lecture/49859849#overview) as well as my many years of using Unity. I've been away from coding for nearly 10 years and getting back into it with this project.
This is fully functional and has some improvements as well (for example, I have a float state that is automatically used with the Gravity Zone, and can be used for swimming). I have a placeholder animation_controller but I have not created any full-body awareness set up yet. I wanted to share this.
As it's been a long time since I coded, I did use Cursor to help me integrate this with Cogito.
The only Cogito file that I made any changes to was cogito_player and the cogito_player.tscn All other changes are in my Scripts folder. @Phazorknight if you want you can drop this in a pull request since I don't know how to do it. Also, if you don't want to use this since I allowed AI to help me, I understand. I hope you like it.
https://github.com/redhwk/Cogito-StateMachine
Cogito Version
- Downloaded Cogito 1.1.5-rc on 12/31/2025 which was 26 commits ahead of main (latest add was CigtoNPC: Added player look-at)
I'm mimicing what mrezai did, but I'm not using StateCharts
COGITO_PLAYER_SETUP.md:
1. Contains setup instructions
cogito_player.gd:
1. Refactored to retain only the following:
- Class definition (lines 1-4)
- Essential signals
- Node references (@onready vars)
- Attribute/Currency management
- Death handling
- External API methods
- set_velocity_from_motion() for state machine
- enter_ladder() forwarder for ladder system
AnimationController:
1. Has null check so that thi sis not required
2. System works without AnimationController (for headless/invisble player)
Created a PlayerResources "Container"
Beta Was this translation helpful? Give feedback.
All reactions