0
\$\begingroup\$

I am attempting to get an update to this question: https://answers.unity.com/questions/57680/should-a-character-controller-attach-with-rigidbod.html

There are conflicting answers. From my understanding since the character controller uses a collider with no rigidbody attached there will be a performance penalty.

"You should never move a Static Collider on a frame by frame basis. Moving Static Colliders will cause an internal recomputation in PhysX that is quite expensive and which will result in a big drop in performance. On top of that the behaviour of waking up other Rigidbodies based on a Static Collider is undefined, and moving Static Colliders will not apply friction to Rigidbodies that touch it. Instead, Colliders that move should always be Kinematic Rigidbodies."

On the other hand there is another answer that says:

"The character controller (CC) - at least as implemented in PhysX, that is a kinematic CC - is a very specific piece of code working alongside (but outside of) the main physics simulation (rigid body dynamics). Although the CC do use a capsule collider, the collision is typically performed "by hand" in the CC code rather than automatically through the physics simulation like other colliders."

Does anyone have more insight into this?

\$\endgroup\$
  • \$\begingroup\$ What does your profiling tell you? My reading of what you shared is that the character controller manages the collision updates, so you don't pay the cost you normally would for teleporting a static collider around. But always, testing and measuring trumps speculation. \$\endgroup\$ – DMGregory Nov 13 at 21:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.