1. Hi, I'm trying to check distance from foundation to terrain, it's possible with RayCast, but I have issues with BoxCast, it does return false always. I need make a four casts from each angle.

    Code:
    RaycastHit hitInfo;
                  
    if (Physics.BoxCast(Block.bounds.center, Block.bounds.extents, Vector3.down, out hitInfo, Block.transform.rotation, float.PositiveInfinity, Rust.Layers.Terrain))
    {
            SendReply(plan.ownerPlayer, "Distance to terrain " + System.Math.Round(hitInfo.distance, 4));
    }
    2016-04-08_08-40-19.png
     
  2. You could just make four different ray casts and have them goto the foundation with an offset I dont know if there is a better way