Skip to main content
Elaborating
Source Link
DMGregory
  • 140.8k
  • 23
  • 257
  • 401

Character Controller componentsAs shown in the scripting API docs, CharacterController inherits from Collider, so the controller component itself can generate physics trigger interactions with colliders marked "Is Trigger"messages - a Rigidbody componenteven if no other (enabled) collider is not expressly needed for this purposeattached to it or present in one of its child objects. Its capsule center/radius/height define the shape and size of its trigger volume.

This capsule shape behaves like a "Kinematic Trigger Collider" according to the "Interaction between collider types" documented here, even if it has no attached Rigidbody. The controller wraps functionality similar to what we get from a kinematic Rigidbody, adapted to common character control use cases.

I'd like to see this stated more explicitly in the Unity documentation, but you can see it hinted at heredoes mention that these components can generate trigger messages:

Note that changing Character Controller properties in the inspector will recreate the controller in the scene, so any existing Trigger contacts will get lost, and you will not get any OnTriggerEnteredOnTriggerEntered messages until the controller is moved again.

This tells us that Character Controllers are capable of generating OnTriggerEntered messages.

You can see in the scripting API docs that CharacterController inherits from Collider, so the whole controller is itself a trigger collider - even if no other (enabled) collider is attached to it or present in one of its child objects. Its capsule center/radius/height define the shape and size of its trigger volume.

Character Controller components can trigger interactions with colliders marked "Is Trigger" - a Rigidbody component is not expressly needed for this purpose.

I'd like to see this stated more explicitly in the Unity documentation, but you can see it hinted at here:

Note that changing Character Controller properties in the inspector will recreate the controller in the scene, so any existing Trigger contacts will get lost, and you will not get any OnTriggerEntered messages until the controller is moved again.

This tells us that Character Controllers are capable of generating OnTriggerEntered messages.

You can see in the scripting API docs that CharacterController inherits from Collider, so the whole controller is itself a trigger collider - even if no other (enabled) collider is attached to it or present in one of its child objects. Its capsule center/radius/height define the shape and size of its trigger volume.

As shown in the scripting API docs, CharacterController inherits from Collider, so the controller component itself can generate physics trigger messages - even if no other (enabled) collider is attached to it or present in one of its child objects. Its capsule center/radius/height define the shape and size of its trigger volume.

This capsule shape behaves like a "Kinematic Trigger Collider" according to the "Interaction between collider types" documented here, even if it has no attached Rigidbody. The controller wraps functionality similar to what we get from a kinematic Rigidbody, adapted to common character control use cases.

I'd like to see this stated more explicitly in the Unity documentation, but you can see it does mention that these components can generate trigger messages:

Note that changing Character Controller properties in the inspector will recreate the controller in the scene, so any existing Trigger contacts will get lost, and you will not get any OnTriggerEntered messages until the controller is moved again.

Source Link
DMGregory
  • 140.8k
  • 23
  • 257
  • 401

Character Controller components can trigger interactions with colliders marked "Is Trigger" - a Rigidbody component is not expressly needed for this purpose.

I'd like to see this stated more explicitly in the Unity documentation, but you can see it hinted at here:

Note that changing Character Controller properties in the inspector will recreate the controller in the scene, so any existing Trigger contacts will get lost, and you will not get any OnTriggerEntered messages until the controller is moved again.

This tells us that Character Controllers are capable of generating OnTriggerEntered messages.

You can see in the scripting API docs that CharacterController inherits from Collider, so the whole controller is itself a trigger collider - even if no other (enabled) collider is attached to it or present in one of its child objects. Its capsule center/radius/height define the shape and size of its trigger volume.