> 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/sphere-cast.md).

# Sphere Cast

Node description and basic instructions

### Description

Casts a sphere along a ray and returns detailed information on what was hit.

This is useful when a Raycast 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. Think of the sphere cast like a thick raycast. In this case the ray is specified by a start vector and a direction.

{% hint style="warning" %}
Sphere Cast will not detect colliders for which the sphere 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 %}

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

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

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

<figure><img src="https://2203000093-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGOxTM7Aj9oiVaIINrEkE%2Fuploads%2FE4OprNN9AiAq5Qh2XKnG%2FPhys5.png?alt=media&amp;token=b5c1c5ac-9e03-46d5-82bc-00303fdc2a56" alt=""><figcaption></figcaption></figure>

### Fields

| Name                      | Description                                                     |
| ------------------------- | --------------------------------------------------------------- |
| Node Name                 | Name of node                                                    |
| Ignore Abort Self         | Whether node ignores abort self or not                          |
| Origin                    | Origin of the Sphere Cast                                       |
| Direction                 | Direction of the Sphere Cast                                    |
| Radius                    | Radius of the sphere                                            |
| Max Distance              | Max length of the cast (by default: *infinity*)                 |
| Culling Layer             | Used to selectively ignore colliders when casting a Sphere 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) |
