# Collision Profile

## Overview

The **Collision Profile** is a system that defines an object's collision properties in detail. Each profile specifies which **Collision Channel** the object belongs to and how it interacts with other channels. This allows you to manage complex collision rules in a structured way. For example, you can set up a variety of gameplay situations such as players colliding with walls while projectiles pass through.

The collision system in OVERDARE Studio consists of **Collision Channels** and **Collision Profiles**. Understanding the role of each and how they relate to one another will help you design your collision system more effectively.

## Collision System Components

### Collision Channel

A Collision Channel is used to group objects or to filter queries such as Raycasts.

* For an Object Type channel
  * Provides functionality similar to the legacy Collision Group.
  * Unlike Collision Groups, the interaction between channels is not configured on the channel itself.
  * The channel simply groups objects, while the actual collision relationships are defined by the **Collision Profile**.

<figure><img src="/files/GjOjrrue7L0ZBpV5EymR" alt=""><figcaption></figcaption></figure>

* For a Trace Type channel
  * Used as an argument in queries such as `RaycastSingleByChannel` and `SpherecastSingleByChannel`.
  * You can configure whether each target object's Collision Profile is detected by the trace.

<figure><img src="/files/9pcycoyzqjixHn2FFJt0" alt=""><figcaption></figcaption></figure>

#### Collision Channel Limits

* You can create up to **32 Collision Channels** in total, of which **18** can be defined directly by the creator.
* A Collision Channel can be added as either a **Trace Type channel** or an **Object Type channel**. Both types share the same pool of 32 channels.
  * There is no limit on the number of Profiles, so you can extend functionality sufficiently without adding more channels.
  * In most cases, adding Profiles alone, without adding new Object Type channels, is enough.

### Collision Profile

A **Collision Profile** is a structure that comprehensively defines the collision-related properties of an object. It is similar in concept to Unreal Engine's Collision Preset and lets you predefine and reuse frequently used collision settings.

Each profile defines the following two items:

<figure><img src="/files/NjgpNV2TSsyA50kHeNpK" alt=""><figcaption></figcaption></figure>

1. **Object Type (Collision Channel):** The Collision Channel that objects using this profile belong to.
2. **Collision Response (interaction rules against other channels):** How the object specifically interacts with each Collision Channel (Block, Overlap, Ignore).

For example, you can define a profile such as: "Objects using this profile belong to the 'Humanoid' channel, Block against the 'WorldStatic' channel, Overlap with the 'Projectile' channel, and Ignore the 'Trigger' channel."

#### Built-in Collision Profiles

OVERDARE Studio provides built-in profiles that predefine commonly used collision settings:

| **Profile Name**      | **Object Type** | **Typical Use**                                               |
| --------------------- | --------------- | ------------------------------------------------------------- |
| **NoCollision**       | WorldStatic     | Objects that do not need collision (e.g., effects, particles) |
| **BlockAll**          | WorldStatic     | Objects that block all channels                               |
| **OverlapAll**        | WorldStatic     | Objects that only overlap with all channels                   |
| **BlockAllDynamic**   | WorldDynamic    | Block-all behavior for dynamic objects                        |
| **OverlapAllDynamic** | WorldDynamic    | Overlap-all behavior for dynamic objects                      |

You can use these built-in profiles as-is, or create custom profiles when needed.

## How to Use Collision Profiles

### Displaying the Collision Profile Panel

The Collision Profile panel can be displayed by clicking the **Collision Profile button** in the **Model tab**, which appears in the top tab area of OVERDARE Studio.

<figure><img src="/files/EfUfT9CgdO5wX9BapBme" alt=""><figcaption></figcaption></figure>

### Creating and Managing Collision Channels

#### Adding a Collision Channel

In the Collision Profile window, you can rename an Empty Channel in the **Collision Channel** section to use it as a new channel.

{% hint style="info" %}
The built-in Default Channel cannot be renamed or deleted. Channel names can be up to 50 characters long.
{% endhint %}

<figure><img src="/files/cnVBkMZafhsHEEOYUDPs" alt=""><figcaption></figcaption></figure>

#### Managing Collision Channels

You can double-click a channel name to rename it, and use **Delete** to remove the channel.

{% hint style="info" %}
You cannot rename a channel to a name that already exists. Deleting a channel may affect profiles that use it, so proceed with caution.
{% endhint %}

#### Editing Collision Channel Information

**ObjectType**

Sets the channel as an Object Type and defines the default Response for that Object Type.

If no specific Profile is assigned, all objects of that Object Type will use this default Response.

**TraceType**

When set as a TraceType, it determines how that Trace Channel responds to each Collision Profile.

For example, if the TraceResponse for the Pawn profile is set to Ignore, Raycasts using this channel will not detect Parts or MeshParts that use the Pawn Profile.

{% hint style="info" %}
**Common Use Case**

Setting the Wall Collision Profile to Ignore on the CameraChannel ensures that walls with the Wall Profile placed between the character and the camera do not cause the camera to move in front of the wall to keep the character visible.
{% endhint %}

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhRPi87oM9ttlk5nyu7L7%2Fuploads%2Fln65WmRyxJsAO30XwBd2%2Fvideo_1280.mp4?alt=media&token=edda8dd1-71cf-43c1-9594-a7ea09806830>" %}

### Creating and Managing Collision Profiles

#### Adding a Collision Profile

In the Collision Profile window, click the **+ New Profile button** to create a new profile. New profiles are created with the name **New Profile**, and you can rename them to create and manage multiple profiles.

<figure><img src="/files/qneiWFPfxVzmV5OnVeDR" alt=""><figcaption></figcaption></figure>

#### Configuring a Collision Profile

When you select a profile, the right-hand panel lets you configure the following items:

**Object Type Setting**

Select the **Collision Channel** that objects using this profile will belong to from the **Object Type** dropdown menu.

For example, for a player character profile you might select the "Player" channel, while for static objects such as walls or floors you would select the "WorldStatic" channel.

**Per-Channel Interaction Settings**

In the **Collision Responses** section, you can configure how the profile specifically interacts with each Collision Channel.

For each channel, you can choose one of the following options:

| Option      | Description                                                                                                     |
| ----------- | --------------------------------------------------------------------------------------------------------------- |
| **Block**   | Collides with objects in this channel. If the channel is a Trace Type channel, the object is detected as a Hit. |
| **Overlap** | Overlaps with objects in this channel without producing a physical collision.                                   |
| **Ignore**  | Does not interact with objects in this channel.                                                                 |

{% hint style="warning" %}
**Collision Response Priority**:

Collision Responses are prioritized in the order **Ignore > Overlap > Block**. When two objects have different Responses for each other, the higher-priority Response wins.

* Block vs Overlap is treated as Overlap.
* Block vs Ignore is treated as Ignore.
* A collision occurs only when both objects are set to Block.
  {% endhint %}

{% hint style="info" %}
**Collision Between Objects in the Same Channel**: Collisions between objects in the same channel (e.g., Pawn vs Pawn) can be configured differently per profile. For example, you can set the RootPart profile to Overlap with other Pawns and the BodyPart profile to Block other Pawns, so that RootParts are ignored and only BodyParts produce Hits.
{% endhint %}

<figure><img src="/files/CxMslddjPk4Nc2hXUWfD" alt=""><figcaption></figcaption></figure>

#### Managing Collision Profiles

You can double-click a profile name to rename it, and use **Delete** to remove the profile.

{% hint style="info" %}
You cannot rename a profile to one of the built-in profile names. Deleting a profile may affect objects that use it, so proceed with caution.
{% endhint %}

### Applying a Collision Profile to an Object

Select the object (Part, MeshPart, etc.) you want to configure, and then enter the profile name in the **Collision Profile** property in the Properties window.

Each object can have **only one** Collision Profile.

<figure><img src="/files/qIZmzsVRSi1sXC5MdrZI" alt=""><figcaption></figcaption></figure>

## Collision Profile Usage Examples

### Example 1: Player and Projectile System

You can set things up so that the player character collides with walls, while projectiles pass through the player and only collide with walls.

1. **Create Collision Channels**

* Create the "Humanoid" channel (or use a built-in channel).
* Create the "Projectile" channel.
* Create the "WorldStatic" channel (built-in, renamed from WorldStatic).

2. **Create Collision Profiles**

**PlayerProfile**:

* Object Type: Humanoid
* Collision Response
  * WorldStatic: Block
  * Projectile: Overlap
  * Humanoid: Block

**ProjectileProfile**:

* Object Type: Projectile
* Collision Response
  * WorldStatic: Block
  * Humanoid: Overlap
  * Projectile: Ignore

3. **Apply Profiles to Objects**

* Apply PlayerProfile to the child Parts of the player character.
* Apply ProjectileProfile to projectile objects.
* Apply a profile using the WorldStatic channel to walls and floors.

### Example 2: Trigger Volume

You can create a trigger volume that fires an event when a specific area is entered.

1. **Create Collision Channels**

* Create the "Trigger" channel (or use a built-in channel).

2. **Create Collision Profiles**

**TriggerProfile**:

* Object Type: Trigger
* Collision Response
  * Humanoid: Overlap
  * WorldStatic: Ignore
  * Projectile: Ignore

3. **Apply Profiles to Objects**

* Apply TriggerProfile to the trigger volume Part.
* Use the `Touched` event to detect when the player enters.

### Example 3: Using Built-in Profiles

You can quickly apply collision settings by leveraging the built-in profiles.

1. **NoCollision profile**: Apply to objects that do not need collision, such as effects and particles.
2. **BlockAll profile**: Apply to walls, floors, and other objects that must collide with everything.
3. **OverlapAll profile**: Apply to trigger volumes that only overlap with everything.

You can also duplicate and customize a built-in profile, or create entirely new profiles as needed.

## Built-in Collision Channels

OVERDARE Studio provides a set of Collision Channels commonly used in game development out of the box.

| **Channel Name** | **Description**                                                  | **Typical Use**                                             |
| ---------------- | ---------------------------------------------------------------- | ----------------------------------------------------------- |
| **WorldStatic**  | <p>Static objects<br>(Anchored, no physics simulation)</p>       | Rocks, fences, walls fixed to the map                       |
| **WorldDynamic** | <p>Dynamic objects<br>(!Anchored, with physics simulation)</p>   | Moving platforms, doors, etc.                               |
| **PhysicsBody**  | <p>Physically simulated objects<br>(CanCollide && !Anchored)</p> | Objects that are physically simulated and handle collisions |
| **Pawn**         | Characters that a player can possess                             | Player characters, NPCs, etc.                               |

## Using Trace Channels

A **Trace Channel** is a channel used in query operations such as Raycasts. When you use a Trace Channel with the `RaycastByChannel()` API, you can detect Hits or Overlaps on a per-profile basis.

### Relationship Between Trace Channels and Object Type Channels

* Trace Channels and Object Type Channels **share the pool of 32 channels**.
* Trace Channels are used in query operations such as Raycast and LineTrace.
* Object Type Channels are used to group objects for collision.
* The same channel can be used as both a Trace Channel and an Object Type Channel.

### Trace Channel Usage Examples

When you perform a Raycast using a specific Trace Channel, results are determined by each profile's Collision Response for that channel:

* **Block**: Detected as a Hit. The `Hit` property of `RaycastResult` is `true`.
* **Overlap**: Detected as an Overlap. The `Hit` property of `RaycastResult` is `false` and the `Overlap` property is `true`.
* **Ignore**: Not detected.

For example, if you create a Trace Channel called "WeaponTrace" and set the player profile's response to WeaponTrace to Block, weapon Raycasts will detect only players as Hits and ignore other objects.

## Migrating from Collision Group to Collision Profile

```panel
**Collision Group is scheduled for deprecation.** We recommend using **Collision Profile** for new projects.
```

For creators who have been using **Collision Group**, the following compares the two systems and outlines what to consider when migrating.

### Differences Between Collision Group and Collision Profile

| **Item**                         | **Collision Group**                                      | **Collision Profile**                                 |
| -------------------------------- | -------------------------------------------------------- | ----------------------------------------------------- |
| **Grouping**                     | Groups and relationship definitions are handled together | Channels provide grouping only                        |
| **Collision Relationship Setup** | Set directly between groups                              | Configured per channel on each profile                |
| **Direction of Relationships**   | Always bidirectional                                     | Configured independently per profile                  |
| **Flexibility**                  | Simple collide/no-collide between groups                 | Fine-grained Block/Overlap/Ignore control per channel |
| **Intended Use**                 | Simple collision filtering                               | Managing complex collision rules                      |

### Advantages of Collision Profile

**Collision Profile** offers more granular and flexible collision control than **Collision Group**:

* **Fine-grained per-channel control**: You can configure Block, Overlap, and Ignore independently for each channel.
* **Profile-based exception management**: Without redefining inter-group relationships each time, you can efficiently apply collision rules that fit specific scenarios (e.g., projectile pass-through) using only the independence of each profile.
* **Scalability**: It is easy to add new channels or profiles without affecting existing settings.

## References


---

# Agent Instructions: 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://docs.overdare.com/manual/studio-manual/game-development/collision-profile.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.
