Physics objects fail to collide when moving quickly, despite using CCD
I have a physics problem I'm not even sure how to start looking at.
I have physics objects, which are constrained to another (kinematic) object using a physics constraint.
At low speeds, the objects collide with each other. However, at higher speeds (though still fairly moderate) the objects simply pass through each other like they're not there.
The obvious answers are: 1) The physics steps are too far apart, and the objects are not colliding. However, I've turned on Continuous Collision Detection (CCD) on both objects. Additionally, I've tried cranking the position solver's substeps up to absurd levels (hundreds of substeps per frame) and it doesn't seem to have any effect on the reliability of collisions. I'd expect to at least have to move the objects faster with more substeps if that was the problem.
2) The constraints have a projection option, which teleports the constrained objects to their desired positions. However, I've disabled projection, and the problem appears to be speed related, since if I slowly press the objects together they never teleport to their desired position even if they get quite far away from it. So it seems like projection isn't it, either.
The real kicker is that since whatever is going wrong appears to be happening in PhysX land, I'm not sure how I can debug it, since that all disappears into precompiled DLLs.
Does anyone have any explanations for what might be causing this, or know of a good way to figure it out? The only thing I can think of is to essentially recreate PhysX joints myself using impulses, in the hopes that the problem is the constraint doing something weird and not failure of collision detection. But the later seems more likely, and the whole thing would be a lot of work for such a speculative fix.
Follow this question
Once you sign in you will be able to subscribe for any updates here