Example #1
0
 bool IsBoxOutside(MyPlane plane)
 {
     for (int i = 0; i < vertices.Length; i++)
     {
         if (plane.GetSide(new Vec3(vertices[i] + cube.transform.position)))
         {
             return(false);
         }
     }
     return(true);
 }
 bool DetectObject(Vec3 cubePos)
 {
     if (_planeNear.GetSide(cubePos) && _planeRight.GetSide(cubePos) && _planeLeft.GetSide(cubePos) &&
         _planeDown.GetSide(cubePos) && _planeTop.GetSide(cubePos) && _planeFar.GetSide(cubePos))
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }