In particle physics you can fill a solid object with particles and mess around with the settings in such a way that it naturally clumps them more towards the center. What I would like to do is use blender’s capacity to detect those distances from inside a mesh for animating a single object.
What I want is to animate an object inside a sphere, an object that is embedded inside another mesh, but I want its movement to increase proportional to the distance from the average weight of the nearest vertices.
That is, the closer to the center of the sphere the mesh is, the less the mesh moves in proportion to deformations. But, the closer to the surface of the sphere the mesh is, the move it moves thus keeping it inside the sphere but also allowing the sphere to affect its movement, as if there was pressure inside.
If you use child-of on an entire mesh or even a weight vertex group, this isn’t adaptive enough to account for all distances as the sphere deforms from shape keys or bones. The particle physics has an intrinsic way to detect this, but for some reason, the constraints tab doesn’t.