Method TryGetGroundPoint
- Namespace
- GrindFest
- Assembly
- GrindFest.dll
TryGetGroundPoint(Vector3, out Vector3, Transform)
The ground point under a world position, or false when there is nothing to stand on yet.
"Ground" is GroundLayerMask - Floor, Terrain, Water - i.e. the definition
the game itself uses, not "any collider". The old ~0 version is what buried a planter pot
2.5 m UNDER the terrain on 2026-09-20 (hero at -191.81, 11.33, 568.79): the probe returned three
hits in unsorted order - terrain 11.37, a backdrop 'Plane' on the Darkness layer at 8.77, the hero's
trigger at 18.80 - took whichever came first, and placed the pot on the Darkness plane. Inside the
world, invisible, and every later assertion about it read 'Empty' instead of naming a fall.
ignore additionally to ask "is there ground here apart from this object?" -
the only way to measure under a prop, since the prop's own collider is otherwise the first hit.
public static bool TryGetGroundPoint(Vector3 worldPos, out Vector3 ground, Transform ignore = null)