For my game, I need to know when the player is over a powerup and for this I use a sphere collider:
3rd side view:
Legend:
- orange, the powerup outline, a quad for which I know its centroid
- green, sphere collider outline, its center is quad centroid but radius is random for now
Radius for circumscribed circle is easy since I know center and vertices it should encompass:
Radius for inscribed circle is what I'd like to achieve instead:
I guess I am close with the following links but unsure as on how to do it for 3D points:
https://en.wikipedia.org/wiki/Tangential_quadrilateral
https://en.wikipedia.org/wiki/Bicentric_quadrilateral
So, knowing a 3D quadrilateral and its centroid, how can I find the radius of an inscribed sphere at its center?


