SHARE
TWEET

Ball_Table Collision

ricci21 Mar 5th, 2012 640 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. private bool Ball_Table(Model model1, Matrix world1)
  2.         {
  3.            
  4.             for (int meshIndex1 = 0; meshIndex1 < model1.Meshes.Count; meshIndex1++)
  5.             {
  6.                 BoundingSphere sphere1 = model1.Meshes[meshIndex1].BoundingSphere;
  7.                 sphere1 = sphere1.Transform(world1);
  8.  
  9.                 if(table_box.Intersects(sphere1))
  10.                     return true;
  11.             }
  12.             return false;
  13.         }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top