public static bool IsCollided(Vector3 point, Barrel b) { if (b.Intersects(new BoundingSphere(point, 0))) { return(true); } return(false); }
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); }