Case Status
Log In

Wiki

Options

 
Home ยป Action Reference»Physics Actions»Raycast All
Index
Navigation
Community Wiki

Raycast All

Casts a Ray against all Colliders in the scene. Use either a GameObject or Vector3 world position as the origin of the ray. Use GetRaycastAllInfo to get more detailed info.

From Game Object
Start ray at game object position. Or use From Position parameter.
From Position
Start ray at a vector3 world position. Or use Game Object parameter.
Direction
A vector3 direction vector
Space
Cast the ray in world or local space. Note if no Game Object is specfied, the direction is in world space.
Distance
The length of the ray. Set to -1 for infinity.
Hit Event
Event to send if the ray hits an object.
Store Did Hit
Set a bool variable to true if hit something, otherwise false.
Store Hit Objects
Store the GameObjects hit in an array variable.
Store Hit Point
Get the world position of the ray hit point and store it in a variable.
Store Hit Normal
Get the normal at the hit point and store it in a variable.
Store Hit Distance
Get the distance along the ray to the hit point and store it in a variable.
Repeat Interval
Set how often to cast a ray. 0 = once, don't repeat; 1 = everyFrame; 2 = every other frame... Since raycasts can get expensive use the highest repeat interval you can get away with.
Layer Mask
Pick only from these layers.
Invert Mask
Invert the mask, so you pick from all layers except those defined above.
Debug Color
The color to use for the debug line.
Debug
Draw a debug line. Note: Check Gizmos in the Game View to see it in game.

 

Tags:

Last modified on 12/28/2015 10:21 PM by User.

  • RSS Feed