RaycastResult.valid

Returns whether the raycast successfully hit a target.

Kind: Member

Environments: Game

Game

Open the full Game reference

Get

Returns whether the raycast successfully hit a target.

Returns:

Type Description
boolean Whether the raycast successfully hit a target.