Table of Contents

Class TerrainUtility

Namespace
Uncreated.Warfare.Util
Assembly
Uncreated.Warfare.dll
public static class TerrainUtility
Inheritance
TerrainUtility
Inherited Members

Methods

GetDistanceToGround(in Vector3)

Returns the distance from a point to the 'ground' by performing a raycast.

public static float GetDistanceToGround(in Vector3 point)

Parameters

point Vector3

Returns

float

Remarks

The raycast could hit a building, etc. If the raycast doesn't hit anything, SDG.Unturned.Level.HEIGHT will be returned.

GetHighestPoint(in Vector2, float)

Perform a raycast from the sky to find the 'ground'.

public static float GetHighestPoint(in Vector2 point, float minHeight)

Parameters

point Vector2
minHeight float

Returns

float

Remarks

This could hit a building, etc.

GetHighestPoint(in Vector3, float)

Perform a raycast from the sky to find the 'ground'.

public static float GetHighestPoint(in Vector3 point, float minHeight)

Parameters

point Vector3
minHeight float

Returns

float

Remarks

This could hit a building, etc.

GetHighestPoint(in Vector3, float, out Vector3)

Perform a raycast from the sky to find the 'ground'.

public static float GetHighestPoint(in Vector3 point, float minHeight, out Vector3 normal)

Parameters

point Vector3
minHeight float
normal Vector3

Returns

float

Remarks

This could hit a building, etc.

GetMapHighestPeak()

Gets the highest point on the map.

public static float GetMapHighestPeak()

Returns

float