Loading...
Searching...
No Matches
CityBuilderCore.DefaultMapHeight Class Reference

Detailed Description

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

Inheritance diagram for CityBuilderCore.DefaultMapHeight:
CityBuilderCore.IGridHeights

Public Member Functions

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
 

Public Attributes

Terrain Terrain
 
float RoadHeight
 
float MapHeight
 

Member Function Documentation

◆ 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
transformthe transform that will be changed
pathTypeheight may be different when moving on a road for example
overrideValueregular 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
positionabsolute world position
pathTypeheight 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.