duck

duck

Dec 7th, 2010
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.23 KB | None | 0 0
  1.     Bounds myBounds;
  2.     bool boundsInit = false;
  3.     foreach (Vector3 pos in positions)
  4.     {
  5.         if (!boundsInit)
  6.         {
  7.             myBounds = new Bounds(pos, Vector3.zero);
  8.             boundsInit = true;
  9.         } else {
  10.             myBounds.Encapsulate(pos);
  11.         }
  12.     }
Advertisement
Add Comment
Please, Sign In to add comment