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.
Start ray at a vector3 world position. Or use Game Object parameter.
A vector3 direction vector
Cast the ray in world or local space. Note if no Game Object is specfied, the direction is in world space.
The length of the ray. Set to -1 for infinity.
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.
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.
Pick only from these layers.
Invert the mask, so you pick from all layers except those defined above.
The color to use for the debug line.
Draw a debug line. Note: Check Gizmos in the Game View to see it in game.