CharacterController Component does not use the Physics Engine?

Hi!

I was playing around with the physics and a CharacterController component.

I raised the TimeManager Fixed Timestamp to it’s maximum value (10). And also modified the values in the Physics Manager to have as low impact as possible. In theory, by my understanding on how Physics work in Unity, the precision should be waaaaay off at the moment, but moving the CharacterController through the Move function results in great precision and great performance.

How is this possible?

Thank you!


EDIT:

After some research I found that:

Rigidbody:

  • Done in FixedUpdate()
  • Uses Unity’s full physics system. It can be used with physics
    forces/impulses, etc.
  • Slides down hills however, since friction doesn’t seem to do much.
  • It’s best suited for objects but
    doesn’t have much control for
    players.
  • Works with OnCollision events

CharacterController:

  • Done in Update()
  • Does NOT use any physics whatsoever, 100% player controlled.
  • The collider itself can not be rotated in any way. It is always vertical.
  • Collides against objects, ONLY in the direction it’s currently moving. If it is moving forward, it will NOT collide with things that hit it’s back or side. If it is not moving, it will NOT collide with anything. If it’s collider passes through an object (such as the object moving through it) it wll NO LONGER collide with that object.
  • Does not work with OnCollision events. Only works with OnControllerColliderHit() against objects it’s currently moving into. Not for anything that collides into it.

Credit: Juice TinSource

In summary, if your gameplay is based only on your character’s movement and your character’s collision with other object (such as endless runners), it’s best to use CharacterController because you will get rid of a lot of overhead from physics calculations while the collision detection has perfect precision.

Perhaps because the CharacterController is kinematic? This means it’s controlled via script and serves as an obstacle to non-kinematic physics bodies; changing the physics precision will probably affect how it interacts with dynamic physics objects, but as its movement is controlled entirely by script, it’s unaffected by precision changes.

I don’t know if that’s true, but you can easily test it. Throw in a bunch of dynamic cubes and see how they behave with high precision vs low precision if you run into them.