0
\$\begingroup\$

i'have made a ball within a sphere (which imported from blender, with mesh collider), see the pic

enter image description here

after the scene started, the ball bounce inside around 5 seconds, and then the ball will penetrate (see the arrow) the sphere and drop out of sphere, anyone knows the reasons?

\$\endgroup\$
  • 2
    \$\begingroup\$ More than likely, it passes right through your collider because it is going too fast. Either force it to maintain a velocity that will not allow it to exit the collider, or change your collision algorithm to be Continuous (CCD). CCD collision checks are more expensive, but work much better. \$\endgroup\$ – jgallant Jul 15 '15 at 11:07
  • \$\begingroup\$ Jon is right. Additionally set ball's Rigidbody intperolate to Extrapolate \$\endgroup\$ – Hamza Hasan Dec 15 '15 at 9:10
1
\$\begingroup\$

The physics engine is doing its updates every so often, tick-wise. that means if the ball is too fast it passes through the object it should collide with. I dont know how far you can modify the physics engine, but saving the last calculated position in addition to the actual position and then checking if an object is in beetween those positions should fix it.

|improve this answer|||||
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.