Raff you were absolutely right, I am.having that exact issue.
What im trying to achieve is something like a golf ball effect. Where spheres fly in and create an indentation on a master sphere. Where the indentations are toward the master spheres center.
Any ideas??
Thanks again for all.your help
Jim
What you need to do is determine if the tiny sphere penetrates the master sphere. You can do that by computing the vector starting at the tiny sphere’s center and pointing towards the master sphere’s center, then measure its length. Computing the vector is a subtraction of tiny sphere’s global position from the master sphere’s global position. If its length is less than tiny_sphere_radius + master_sphere_radius, the tiny sphere has penetrated.
How the dent is performed on the master sphere really depends on the effect you want. If you want total friction, then you push the master’s vertices in the direction of travel by the tiny sphere. If you want a friction free dent, then you’ll likely push the vertices along the tiny sphere’s surface normal at point of contact. The former will gouge the master sphere’s surface like a meteor impact dragging the mud along the path of travel, the latter will create an elastic dent like when you try to poke your finger through an inflated balloon.
Matt