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.
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
bool True when the sphere sweep intersects any collider, otherwise false.
To create it, right-click on free space in AI Tree inspector and select Create Node/Tasks/Physics/Sphere Cast.
This task node has a number of fields, that are highlighted in picture below.
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 |
Last updated