RayCast#

Method in RayCastHelper

RayCast(Vector3, Vector3, out float)#

Call this once each frame to do the query.

Declaration#

public bool RayCast(Vector3 origin, Vector3 direction, out float distance)

Parameters#

origin

World space position of ray origin

direction

World space ray direction

distance

The distance along the ray to the first intersection with the water surface.

Return#

True if the results have come back from the GPU, and if the ray intersects the water surface.