GetWeight(Vector2, float)
Gets how strongly an edit of this region applies at a position.
Read time 1 minuteLast updated 22 days ago
Definition
- Type: Method
- Namespace: UnityEditor.TerrainTools
- Assembly: UnityEditor
public float GetWeight(Vector2 position, float falloff)
Parameters
Returns
Type | Description |
|---|---|
| float | The weight, from 0 to 1. |
Remarks
The weight is 1 inside the region and 0 outside it. With a falloff, it fades smoothly (smoothstep) from 1 to 0 towards the edge of the region, over that fraction of the half size of a rectangle, the radius of a disc, or the half width of a corridor.