- Home /
Find out needed sphere radius to cover a collider
Basically, I have a game object with several primitive colliders attached to it (sphere, box, capsules..). And then, if I place a sphere at the, for example, rigidbody mass center of this game object, I want to find out, what radius does the sphere need to have, to envelope the game object (all its colliders) completely. So that all of the game object's colliders are completely inside of this sphere.
Thank you
Answer by meat5000 · Jul 28, 2015 at 09:14 PM
See this
http://docs.unity3d.com/ScriptReference/Renderer-bounds.html
But beware; This appears to be in world space whereas the centre and radius variables of a SphereCollider are local according to the docs.
The Bounds page is most useful.
Your answer
![](https://koobas.hobune.stream/wayback/20220611233446im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
How a rotating sphere can rotate all the objects on the surface aswell? 1 Answer
Weird behaviour with OnTriggerEnter 0 Answers
How to do collision in 2d game? 1 Answer