Disable collisions (ghost)

There are currently two ways an actor (Rigidbody) can be able to properly ignore obstacles in the scene:

Disabling the collider component

The actor uses a ColliderComponent component which is a wrapper around a 2D/3D collider. Enabling or disabling this component will automatically enable/disable the collider.

CharacterActor.ColliderComponent.enabled = enableCollider;

Configuring the collision matrix

Another way to make a ghost character is by changing the collision matrix from the Physics (Physics2D) settings. By default, the character actor uses the current collision matrix for all collision detection methods.

Last updated