Hi, I am currently thinking about starting a fps project that would have parkour included on it (kinda inspired from games like Mirror’s Edge and the game that was funded not so much time ago, Hover: Revolt Of Gamers).
For this type of game, should I use the standard assets character controller or would it be better if I code my own? I feel like coding my own would be better because I would learn from it and actually suit it for my needs but that script seems kinda complicated (looking at the standard fps controller motor), but I also don’t like using standard assets, I guess it’s something that never appealed to me. So is there any tutorial to get started on that? The one that I’ve been using was a rigidbody controller and I’ve latetly started to notice that the movement is actually kinda weird and I feel like character controllers are pretty powerful if I learn how to do them right.
Seriously, the included character controller is really only good for prototyping. It’s slow, glitchy, generally a mess that deals with its own special physics, and all around a bad thing. For a project like yours, you’re really going to need your own.
I was expecting something like that I guess I’ll start trying something, know of any good resources for starting? I haven’t coded a lot of character controller related stuff yet
There are two distinct types of character controllers: kinematic and physics-based. Kinematic means you control it manually so the player has perfect control over character motion and you simply fake enough physics so it feels right. Physics-based uses a rigidbody and you apply forces to it, but it is difficult to get it to always give the player precise character control. Kinematic is more common, but if you are doing a heavily physics-based games it can be better to use physics-based characters (i.e. I imagine a game like this uses physics-based character controller: Gang Beasts).
The standard Unity character controller is kinematic (i.e. it acts as a capsule collider and fakes its own physics). It’s a complete black box so you can not modify its behaviour at all without simply rewriting it from scratch (which you will likely end up doing). The character controller that comes with the “Sample Assets” on the Unity asset store is physics-based, and you should be able to customize it.
Yes, me, too. That’s what I am talking about. There are two basics types: with or without a rigidbody.
Bottom line is you’re usually better off writing your own custom kinematic controller, but that is more challenging than it sounds. You need to manually handle things like collisions, sliding along barriers, stepping over obstacles (i.e. stairs), jumping/falling, etc.
If you’re interested in building a custom character controller, I’d recommend checking the link to my blog in my signature. I recently got frustrated with the built in controller, and using Forces to build a responsive character is pretty much impossible so I decided to build my own. Since I pretty much knew nothing about how custom physics work, I decided to write a little series of articles about building one.
I’m more or less done the first version of the controller and I plan to write a fourth (and final, for awhile) entry detailing how it works, and then I’ll find a convenient way to release it to the community.