SampleHeight¶
SampleHeight(Vector3, out float, out Vector3, out Vector3, float, CollisionLayer)¶
Sample displacement data.
Only call once per frame.
Declaration¶
public bool SampleHeight(Vector3 position, out float height, out Vector3 velocity, out Vector3 normal, float minimumLength = 0, CollisionLayer layer = CollisionLayer.Everything)
Parameters¶
position |
World space position to sample. |
height |
The water surface height. |
velocity |
The velocity of the water surface excluding flow velocity. |
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. |
layer |
The collision layer to target. |
Return¶
Whether the query was successful.
SampleHeight(Vector3, out float, out Vector3, float, CollisionLayer)¶
Sample displacement data.
Only call once per frame.
Declaration¶
public bool SampleHeight(Vector3 position, out float height, out Vector3 velocity, float minimumLength = 0, CollisionLayer layer = CollisionLayer.Everything)
Parameters¶
position |
World space position to sample. |
height |
The water surface height. |
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. |
layer |
The collision layer to target. |
Return¶
Whether the query was successful.
SampleHeight(Vector3, out float, float, CollisionLayer)¶
Sample displacement data.
Only call once per frame.
Declaration¶
public bool SampleHeight(Vector3 position, out float height, float minimumLength = 0, CollisionLayer layer = CollisionLayer.Everything)
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. |
layer |
The collision layer to target. |
Return¶
Whether the query was successful.