sets the heights of entities depending on whether an entity is on a road or the map
a terrain can be defined that will be sampled and added for entities on the map
https://citybuilder.softleitner.com/manual
|
float | GetHeight (Vector3 position, PathType pathType=PathType.Map) |
| calculates height at given world position
|
|
void | ApplyHeight (Transform transform, Vector3 position, PathType pathType=PathType.Map, float? overrideValue=null) |
| applies heigth to the passed transform
the transforms position may be used to calculate the height
|
|
|
Terrain | Terrain |
|
float | RoadHeight |
|
float | MapHeight |
|
◆ ApplyHeight()
void CityBuilderCore.DefaultMapHeight.ApplyHeight |
( |
Transform | transform, |
|
|
Vector3 | position, |
|
|
PathType | pathType = PathType.Map, |
|
|
float? | overrideValue = null ) |
|
inline |
applies heigth to the passed transform
the transforms position may be used to calculate the height
- Parameters
-
transform | the transform that will be changed |
pathType | height may be different when moving on a road for example |
overrideValue | regular height calculation may not always apply, for example on bridges(which use IOverrideHeight) |
Implements CityBuilderCore.IGridHeights.
◆ GetHeight()
float CityBuilderCore.DefaultMapHeight.GetHeight |
( |
Vector3 | position, |
|
|
PathType | pathType = PathType.Map ) |
|
inline |
calculates height at given world position
- Parameters
-
position | absolute world position |
pathType | height may be different when moving on a road for example |
- Returns
- height at position or 0 if height cannot be represented by a number(layer height for example)
Implements CityBuilderCore.IGridHeights.