Ray Cast

Node description and basic instructions

Description

Casts a ray, from point origin, in direction direction, of length max Distance, against all colliders in the Scene.

Specifying Query Trigger Interaction allows you to control whether or not Trigger colliders generate a hit.

Raycasts will not detect Colliders for which the Raycast origin is inside the Collider.

bool Returns true if the ray intersects with a Collider, otherwise false.

To create it, right-click on free space in AI Tree inspector and select Create Node/Tasks/Physics/Ray Cast.

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

Fields

NameDescription

Node Name

Name of node

Ignore Abort Self

Whether node ignores abort self or not

Origin

Origin of the Ray Cast

Direction

Direction of the Ray Cast

Max Distance

Max length of the cast (by default: infinity)

Culling Layer

Used to selectively ignore colliders when casting a Ray Cast

Query Trigger Interaction

Specifies whether this query should hit Triggers

Message

NameDescription

Message

Value of message

Argument

Argument of message in Blackboard

Last updated