How to prevent a sphere collider to go through a box collider
Hello,
I've a peculiar problem with Unity and colliders.
My scene is composed by a sphere and a box. The scene is with no gravity. The box and the sphere are linked by a spring. My box have box collider, rigidbody and mesh rederer components, and my sphere have sphere collider, rigidbody, and mesh rederer components.
I want to push my sphere with the box.
My problem is that sometimes, the sphere go through the box, even if I create a huge box collider to prevent such event.
Do you have a solution to my problem ?
Thanks
Ben
Answer by Naphier · Mar 06, 2016 at 09:04 PM
http://docs.unity3d.com/Manual/class-SpringJoint.html Enable collision on the spring joint should do it!
I think that worked pretty well !
I have then an other problem : when I push my sphere, I want the sphere to progressively slow down and to come back to my hand. In my situation, my sphere stop exaclty where i push it, it seems that there is no any inertia... Even if I configure my RigidBody.Drag to 0.
How can I add some inertia ?
Thanks
The site isn't really for having a back-and-forth conversation. It's made so you have 1 Q, search for it and probably find it's already been asked/answered. If not, make a new Q about that 1 thing. That way, any answers you get can help other people later.
If your Q has a lot to do with your exact set-up, so wouldn't help anyone else, try the HelpRoom area.