Sample#

Sample(Vector3, out Vector3, out Vector3, out Vector3, float)#

Sample displacement data.

Only call once per frame.

Declaration#

public bool Sample(Vector3 position, out Vector3 displacement, out Vector3 normal, out Vector3 velocity, float minimumLength = 0)

Parameters#

position

World space position to sample.

displacement

The water surface displacement to point.

normal

The water surface normal.

velocity

The velocity of the water surface excluding flow velocity.

minimumLength

The smallest length scale you are interested in. If you are sampling data for boat physics, pass in the boats width. Larger objects will ignore smaller details in the data.

Return#

Whether the query was successful.

Sample(Vector3, out float, out Vector3, out Vector3, float)#

Sample displacement data.

Only call once per frame.

Declaration#

public bool Sample(Vector3 position, out float height, out Vector3 normal, out Vector3 velocity, float minimumLength = 0)

Parameters#

position

World space position to sample.

height

The water surface height.

normal

The water surface normal.

velocity

The velocity of the water surface excluding flow velocity.

minimumLength

The smallest length scale you are interested in. If you are sampling data for boat physics, pass in the boats width. Larger objects will ignore smaller details in the data.

Return#

Whether the query was successful.

Sample(Vector3, out float, out Vector3, float)#

Sample displacement data.

Only call once per frame.

Declaration#

public bool Sample(Vector3 position, out float height, out Vector3 normal, float minimumLength = 0)

Parameters#

position

World space position to sample.

height

The water surface height.

normal

The water surface normal.

minimumLength

The smallest length scale you are interested in. If you are sampling data for boat physics, pass in the boats width. Larger objects will ignore smaller details in the data.

Return#

Whether the query was successful.

Sample(Vector3, out float, float)#

Sample displacement data.

Only call once per frame.

Declaration#

public bool Sample(Vector3 position, out float height, float minimumLength = 0)

Parameters#

position

World space position to sample.

height

The water surface height.

minimumLength

The smallest length scale you are interested in. If you are sampling data for boat physics, pass in the boats width. Larger objects will ignore smaller details in the data.

Return#

Whether the query was successful.