Hollow Objects

Nov 16, 2010 at 1:20 PM

How can I have a hollow object, where any objects inside that object, are constrained by the hollow object.

For example, if I have a large hollow sphere, how can I keep a group of smaller spheres inside that sphere?

Henge will normally assume overlap and push the smaller spheres outside the larger sphere so how can this be avoided?

I've thought about a spherical mesh with the triangle normals facing the centroid, but this is not ideal.

Thank you.

Coordinator
Nov 22, 2010 at 11:13 PM

For something like a box, I'd probably use a composite shape consisting of 6 slabs. A sphere would be a little tougher, though. The collision system isn't really set up to do stuff like that, so it would probably require a new type of primitive and narrow phase collision check. I'm thinking something similar to the existing plane primitive, except checking distance from some central point instead of distance from a plane.

If my thinking is correct, the collision logic should be pretty simple since only the vertices of convex polyhedra would need to be tested against the outside of the sphere. It wouldn't be possible to have an edge or face intersection without also having vertices outside the sphere. Same would go for the endpoints of a capsule. In your case, if you're just doing spheres inside a sphere, that should be the simplest of all.

I'll see if I can whip up a sample for you after I get this windows phone stuff worked out.