duck

duck

Dec 7th, 2010
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.20 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.         } else {
  9.             myBounds.Encapsulate(pos);
  10.         }
  11.     }
Advertisement
Add Comment
Please, Sign In to add comment