Prevent Grabbed Object from Clipping

125706-screenshot-2018-10-06-20-01-56.pngOkay so I have this grabbing function. How do I approach preventing it from clipping? Thanks.

125707-screenshot-2018-10-06-20-01-52.png

There are lots of solutions to this problem, and the best one will depend on your game.

If you want to prevent the Object from clipping, your best bet is to give it and anything it can’t clip-with a non-kinematic non-trigger collider and a rigidbody. Then add a joint to your pick-up tool (hand? glove?)

Attach the object to the joint upon pickup and release the link when you want to drop. This should ensure that physics is preserved on the object while you are moving it. You can also put in a quantity of force that will break the link to the joint. So if someone tries to make this thing co-exist in the space with another solid object, eventually the hand will lose its grasp rather than violating physics.