> For the complete documentation index, see [llms.txt](https://renownedgames.gitbook.io/ai-tree/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://renownedgames.gitbook.io/ai-tree/nodes/tasks/physics/capsule-cast.md).

# Capsule Cast

### Description

Casts a capsule against all colliders in the Scene and returns detailed information on what was hit.

The capsule is defined by the two spheres with radius around point 1 and point 2, which form the two ends of the capsule. Hits are returned for the first collider which would collide against this capsule if the capsule was moved along direction. This is useful when a [Raycast ](/ai-tree/nodes/tasks/physics/ray-cast.md)does not give enough precision, because you want to find out if an object of a specific size, such as a character, will be able to move somewhere without colliding with anything on the way.

{% hint style="info" %}
**bool** True when the capsule sweep intersects any collider, otherwise false.
{% endhint %}

{% hint style="warning" %}
Capsule Cast will not detect colliders for which the capsule overlaps the collider. Passing a zero radius results in undefined output and doesn't always behave the same as [Raycast](/ai-tree/nodes/tasks/physics/ray-cast.md).
{% endhint %}

**To create it**, right-click on free space in AI Tree inspector and select <mark style="color:purple;">Create Node/Tasks/Physics/Capsule Cast.</mark>

This task node has a number of fields, that are highlighted in picture below.

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

### Fields

| Name                      | Description                                                      |
| ------------------------- | ---------------------------------------------------------------- |
| Node Name                 | Name of node                                                     |
| Ignore Abort Self         | Whether node ignores abort self or not                           |
| Point 1                   | Center of the sphere at the *start* of the capsule               |
| Point 2                   | Center of the sphere at the *end* of the capsule                 |
| Direction                 | Direction into which to sweep the capsule                        |
| Radius                    | Radius of the capsule                                            |
| Max Distance              | Max length of the cast (by default: *infinity*)                  |
| Culling Layer             | Used to selectively ignore colliders when casting a Capsule Cast |
| Query Trigger Interaction | Specifies whether this query should hit Triggers                 |

### Message

| Name     | Description                                                       |
| -------- | ----------------------------------------------------------------- |
| Message  | Value of message                                                  |
| Argument | Argument of message in [Blackboard](/ai-tree/basic/blackboard.md) |


---

# 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://renownedgames.gitbook.io/ai-tree/nodes/tasks/physics/capsule-cast.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.
