- Home /
Is there support for continuous collision detection / fast collision detection in unity?
Hi. I am currently evaluating unity to use in my projects. I plan to make games with fast moving physics objects (e.g. Airhockey, "ball games" like pools or table football). One thing I noticed (and this isn't new to me) is that when you collide fast moving objects they tend to pass through each other. In the examples above, the mallet passing through the puck, or the player passing through the ball. I have used the PhysX engine directly and know it has "Continuous Collision Detection support for fast moving objects" listet on its feature page. I would like to know if this feature is supported in unity, too. So far I could not find anything in the manuals.
Thanks, teppic
Answer by duck · May 12, 2010 at 07:20 PM
No, this feature is not supported in the current version of Unity (2.6).
The best you can do at the moment (until the physx system is upgraded in the coming 3.0 release) is to turn up the physics accuracy (by reducing the physics fixed time step), or to use raycasting each frame to test the gap between each physics step to see whether the object will go through something on its next step (or did on its last).
There's a script on the wiki which does exactly this, called "Don't go through things!".
Answer by jonas-echterhoff · May 12, 2010 at 04:27 PM
Not yet, but we will add this feature in 3.0.
Looks like the feature has been implemented now ( http://unity3d.com/support/documentation/ScriptReference/Rigidbody-collisionDetection$$anonymous$$ode.html ), but it's still not as good as the script Duck's pointed. What you think?
Your answer
Follow this Question
Related Questions
fast forward physic vehicles 0 Answers
Problem with fast physics 0 Answers
2D 360 degress platformer example needed 0 Answers
Fast moving object not detect collision 3 Answers