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

Detailed Description

applies height to objects by changing their layer when there is a height override that fits one of the Heights
used in the urban tunnel demo to change cars in the underground to the underground layer

https://citybuilder.softleitner.com/manual

Inheritance diagram for CityBuilderCore.LayerMapHeight:
CityBuilderCore.IGridHeights

Classes

class  LayerHeight
 

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

int DefaultLayer
 
LayerHeight[] Heights
 

Member Function Documentation

◆ ApplyHeight()

void CityBuilderCore.LayerMapHeight.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.LayerMapHeight.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.