Skip to main content

TerrainOffsetPart

A class in Root.Township, the global namespace.

Generation part that raises or lowers the terrain height in a circle around it, using curves for offset and blend by distance.

Constructors​

MemberWhat it is
TerrainOffsetPart()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

3 private and internal fields
MemberWhat it is
private AnimationCurve offsetHeight offset by distance from the centre (0 to 1 across the radius).
private float radiusRadius of the affected area.
private AnimationCurve weightHow strongly the new height is blended in, by distance.

Methods​

MemberWhat it is
override void GenerateStatic(GenerationCore core, bool isModifyingTerrain)When allowed to modify terrain, blends heights in the radius towards this position's height plus offset.
1 private and internal method
MemberWhat it is
private void OnDrawGizmos()Draws the radius as a green circle.