GameObjectDisplay
A class in Root.Township, Alta.Caves.Displays.
Cave chunk display that places objects (networked prefabs or static pieces) at non-zero cells of its layer, with hashed offset, rotation and scale, optional floor height and raycast.
- Listed in World generation
- Inherits or implements
BasicObjectDisplay
Constructors
| Member | What it is |
|---|---|
GameObjectDisplay() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
19 private and internal fields
| Member | What it is |
|---|---|
private MapChunkLayer floor | The floor plugin's layer, when isUsingFloorLayer is set. |
private float floorThreshold | Floor layer value below which a cell counts as open, used to find the floor height. |
private bool isOrientedWithFace | If set, objects are rotated to the surface normal found by the raycast. |
private bool isOrientedWithFaceUpForced | With face orientation, skips the extra 90 degree tilt. |
private bool isRacastDown | Raycast down if set, otherwise up. |
private bool isRaycasted | If set, raycasts to find the surface and drops the spawn if nothing is hit. |
private bool isRotationRandom | If set, uses a fully random rotation instead of a random Y rotation. |
private bool isScaleUniform | If set, the random scale variation is the same on all axes. |
private bool isUsingFloorLayer | If set, lifts the spawn to the floor height read from the floor plugin's layer. |
private float maxScale | Scale at a cell value of 1; ignored for networked prefabs. |
private float minScale | Scale at a cell value of 0; ignored for networked prefabs. |
private float offset | Height offset added to the spawn position (and above the raycast hit). |
private float offsetXZ | Declared but not read in this file; the random XZ offset uses a fixed radius of up to 1. |
private float orientationWeight | Blend between a random Y rotation (0) and the surface orientation (1). |
private float rayCastDistance | Maximum raycast length. |
private LayerMask raycastMask | Layers the raycast can hit. |
private float scaleVariation | Random scale change, as a fraction up or down. |
private float yNormalMaximum | Highest allowed Y of the hit normal. |
private float yNormalMinimum | Lowest allowed Y of the hit normal. |