# Enable or disable collisions (ghost)

By default a character detects collisions and responds to that as expected like any dynamic rigid body. If for some reason this character needs to pass through objects then collisions must be disabled in some way. There are two ways you can achieve this:

1. Disabling the collider component.
2. Setting the character as kinematic

## Disabling the collider component

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

```csharp
CharacterActor.ColliderComponent.enabled = enableCollider;
```

{% hint style="info" %}
Note that without a collider the physics engine won't include the body as part of the simulation. In other words, the character won't interact with other bodies in any way.
{% endhint %}

## Setting the character as kinematic

Unlike a dynamic rigid body, a kinematic character is essentially considered by the physics engine as an infinite mass body that doesn't get affected by forces, meaning it can penetrate anything.

```csharp
CharacterActor.IsKinematic = !enableCollisions;
```

{% hint style="info" %}
Note that a kinematic rigid body IS part of the simulation, which means the body will be able to interact with other bodies and also trigger physics-related callbacks.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://lightbug14.gitbook.io/ccp/how-to.../core/disable-collisions-ghost-character.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
