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.

So, I seem to have found a sort-of solution which may explain what’s going on.

I tried adding a simple collision shape to the object (a pill) in the static mesh’s asset. Previously, I had been using only simplified, imported convex geometry (as in, UCX_* objects imported with the FBX from Max/Maya/Blender). So it looks like CCD may not be working with convex hull collision? (I’m not seeing anything in UE4 documentation or PhysX documentation that indicates that this is a restriction, so it might be a bug?)

I still need to turn my physics steps back down to sane values to verify that this is a workable solution, but it’s probably good enough to be livable for me.

I am (hopefully was) having the exact same issue right now. I am working with projectiles and have been troubleshooting the same way that you are. Slow speed equals collision with a collision sphere added a child to my static mesh.

What I just did that appears to be working, for now, is that I have a scene component which I deleted and moved the child collision sphere to the scene component (or root? it’s now the first component on the bullet) with the static mesh as the child. It seems to have solved my problem. Hopefully that helps somewhat.

EDIT: The collisions was hitting my characters CapsuleComponent and not the mesh so it’s not what I need.