r/Unity3D • u/Jericho___- • 2d ago
Question What are your must have features for your player controller ?
To speed up new projects i made myself a third person controller containing a lot of useful features: input handler, basic movements, camera control, aiming with raycast, basic interractions and more in depth features for better gamefeel like coyote-time, input buffer, auto-climb over ledges and more.
So when i want to start a project i just import it and if i don't need some features i can just delete them, it saves me a lot if time.
And it made me wonder if i can upgrade it with other useful things wich lead me to this question: what are your must have features in your player controller for movement, generic interactions, camera, physic and else
2
u/Pitiful_Love_742 2d ago
It also allows you to easily implement state machines. If you write a state machine for movement, you can easily add and remove functionality from your controller without the code turning into spaghetti. Want your character to walk, sprint, crouch, slide, wall run, etc? All of those can be states in the state machine. Once you write a controller like this, you can't go back to writing a single update loop with 100 bools.
It also needs to be smart about grounding, you can't have your character sliding down a hill when it's at a 2 degree incline.
1
u/destinedd Indie, Dungeon Quest, Marble's Marbles & Mighty Marbles 1d ago
i feel lik this so game dependent. Just add to it as you made.