- Home /
How to physically simulate concave object? (wine glass)
I would like to create a physical simulation of a wine glass containing some spheres. The drinking glass is a kinematic body that is moved by a script and the spheres inside the glass should be simulated rigidbodies.
how can I do that, considering that the wine-glass is a completely concave object?
Answer by Owen-Reynolds · Dec 31, 2012 at 04:23 PM
Mesh colliders do work surprisingly well these days (use a lower-poly one -- take out the bevels and edge-support for normals.) But:
Wrapping a bowl with tile-shaped box colliders gives pretty good results. Even as few as 5 wrapped around for each layer.
A quick way to make it is to child a tile-shaped Cube to an empty centered on your bowl. A cube, not just a box collider, so we can always see the surface; and a prefab so we can easily take off the renderer when done. Position and rotate it along a glass edge. Then drag in 5 more (to the Hierarchy pane, so they keep the same position), changing the Y-rotation of the empty to 60, 120, 180 ... . Favor being a little more "inside", since no one can really see a ball isn't quite hitting the glass, but sticking through the glass is pretty obvious.
Answer by TomPendergrass · Dec 30, 2012 at 09:40 PM
Have you tried using a Mesh Collider? It's the most expensive physics calculation, but it uses your mesh topology as collision surfaces.
Your answer
![](https://koobas.hobune.stream/wayback/20220613090139im_/https://answers.unity.com/themes/thub/images/avi.jpg)