SampleDisplacement¶
SampleDisplacement(Vector3, out Vector3, out Vector3, out Vector3, float, CollisionLayer)¶
Sample displacement data.
Only call once per frame.
Declaration¶
public bool SampleDisplacement(Vector3 position, out Vector3 displacement, out Vector3 velocity, out Vector3 normal, float minimumLength = 0, CollisionLayer layer = CollisionLayer.Everything)
Parameters¶
position |
World space position to sample. |
displacement |
The water surface displacement to point. |
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.
SampleDisplacement(Vector3, out Vector3, out Vector3, float, CollisionLayer)¶
Sample displacement data.
Only call once per frame.
Declaration¶
public bool SampleDisplacement(Vector3 position, out Vector3 displacement, out Vector3 velocity, float minimumLength = 0, CollisionLayer layer = CollisionLayer.Everything)
Parameters¶
position |
World space position to sample. |
displacement |
The water surface displacement to point. |
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.
SampleDisplacement(Vector3, out Vector3, float, CollisionLayer)¶
Sample displacement data.
Only call once per frame.
Declaration¶
public bool SampleDisplacement(Vector3 position, out Vector3 displacement, float minimumLength = 0, CollisionLayer layer = CollisionLayer.Everything)
Parameters¶
position |
World space position to sample. |
displacement |
The water surface displacement to point. |
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.