public static Vector3 PutAnchor(GameObject gameObject)
{
float currLowestY = Mathf.Infinity;
Vector3 lowestBounds = default;
foreach (Renderer renderer in gameObject.GetComponentsInChildren<Renderer>())
{
CreateDemoCube(renderer.bounds.min);
if (renderer.bounds.min.y < currLowestY)
{
lowestBounds = renderer.bounds.min;
currLowestY = renderer.bounds.min.y;
}
}
CreateDemoCube(lowestBounds);
return lowestBounds;
}
Iām trying to put a cube on the position of the yellow cross by finding its lowest Y point:

Renderer.bounds does only the bounds, not the shape being cast.