- Home /
 
 
               Question by 
               chriscode · Apr 24, 2016 at 07:32 AM · 
                rigidbody physics  
              
 
              Collider bounds wrong after a while
I have some crates in a game. And I use the bounds. I realise that bounds are an axis aligned box, so they should change size, however they seem to get out of sync and not match the collider, once they've been allowed to fall/rotate.


 Bounds bounds = Absorbed.collider.bounds; 
 
 Debug.DrawLine(bounds.min, absorbedObjectBounds.min + Vector3.up, Color.gray);
 
 Debug.DrawLine(bounds.max, absorbedObjectBounds.max + Vector3.up, Color.gray);
 
 
               
                 
                boundswrong.png 
                (306.7 kB) 
               
 
                
                 
                boundsright.png 
                (217.2 kB) 
               
 
              
               Comment
              
 
               
              Answer by franciscode · Apr 24, 2016 at 05:11 PM
Explanation and link to solution: http://answers.unity3d.com/questions/516072/getting-actual-aabb-of-an-object.html
Solution here: http://answers.unity3d.com/questions/297453/finding-locations-of-vertices-on-a-mesh.html
Great solution. Thanks We should totally work together on a project.
Your answer