Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

Character Controller Improvements/Exposing PhysX API

Discussion in 'Physics' started by JordyJS, Aug 9, 2018.

  1. JordyJS


    Jun 8, 2014
    I think it's safe to say that for a lot of 3D Unity games, most developers start with a CharacterController component. It's one of the best options for beginners as it's incredibly easy to drop onto a character and get them moving with only a few lines of code. But it feels like it's been years since the thing's been updated, and the frustrations are still there.

    There's a lot of quality of life additions I'd love to see it get, or to just see the PhysX API exposed so that we can make those changes ourselves. These problems feel like they shouldn't exist, but oftentimes developers have to implement their own solutions or purchase something different. It'd save a ton of headaches to have some of this stuff out of the box.

    Some things I'd personally love to see:
    • Slope Sliding. Having the controller slide down any normal greater than the slope limit would be fantastic. I know there are ways to code this manually (I do it for pretty much all my projects), but the solution always feels hacky and unpolished, no matter the method. The fact that it gets stuck on things like spheres, capsules, and terrain just feels wrong.
    • Rotation: It's literally impossible to use the character controller if you want to rotate your character in any way. Another kind of silly omission that feels like could be fixed by a custom gravity vector or something.
    • Physics Interaction: Something that lets us interact with other physics objects (rigidbodies) would be great. Being able to push them around while opting to toggle whether the controller reacts or not would save some more programming headaches.
    I think a lot of people like the CharacterController because it's so easy to set up and move around, but it feels like no matter what you're doing you eventually hit a wall (hah). In seeing everything else get these great updates (UI, Mecanim, Timeline, 2D, etc.), it feels like the native character controller has been left in the dust, and there's nothing on the Roadmap for it either.

    I'm curious if you guys have found any truly good, simple alternatives for character controllers. I love the default one, even with its faults, but I'd be down for a straight upgrade if it exists. Most of the options I've tried have been pretty complicated and hard to fit into any existing projects.