Exemple #1
0
 public static bool IsCollided(Vector3 point, Barrel b)
 {
     if (b.Intersects(new BoundingSphere(point, 0)))
     {
         return(true);
     }
     return(false);
 }
Exemple #2
0
        public static bool IsCollided(VioableUnit unit, Barrel b)
        {
            bool ins = false;

            if (b.Intersects(unit.Model.TransformedMajorSphere))
            {
                foreach (BoundingSphere k in unit.Model.TransformedBoundingSpheres)
                {
                    if (k != null)
                    {
                        if (b.Intersects(k))
                        {
                            ins = true;
                            return(ins);
                        }
                    }
                }
            }

            return(ins);
        }