Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Bounds myBounds;
- bool boundsInit = false;
- foreach (Vector3 pos in positions)
- {
- if (!boundsInit)
- {
- myBounds = new Bounds(pos, Vector3.zero);
- boundsInit = true;
- } else {
- myBounds.Encapsulate(pos);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment