Method IsTerrainReadyAt
- Namespace
- GrindFest
- Assembly
- GrindFest.dll
IsTerrainReadyAt(Vector3)
Is the world ready to have something put at worldPos?
Two things have to be true, and checking only the first is the bug this exists to prevent:
- MapMagic generated the tile containing that position and published its layers. The tile object existing is not enough - the data has to be applied.
- There is a collider underneath. Not "the heightmap exists" but "something can be landed on": DropAround(Vector3, float) throws items 2.5 m into the air with an upward impulse and lets gravity finish the job, so an item spawned into a tile whose collider is not live yet falls through the world and every later assertion about it reads 0 / null / "should be destroyed".
public static bool IsTerrainReadyAt(Vector3 worldPos)
Parameters
worldPosVector3