CCD not working anymore

In 4.13 I coulde have high-velocity spheres which would rarely go through Meshes when CCD was active.
But after testing the 4.14 update High-velocity Spheres (still CCD active) constantly go through meshes. Not even with that high of a velocity. (Impulse of 3000 was fast enough to go through simple walls)

Hey Nobody,

I attempted to reproduce this by using the 1st Person template and increasing the velocity of the projectiles to 15,000 (3,000 by default). However, I couldn’t reproduce this behavior.

Could you provide some additional info or a test project? What type of actor are the spheres? How thick is the object they are colliding with and what are the collision settings?

Is CCD active on your meshes as well?

Yes CCD is active and it worked in 4.13 perfectly. I currently have a hard time understanding why its not working in 4.14 since in my test-eviroment when migrating the same meshes everything works as it should. But in my game it goes through the walls even though its the same actor and the same mesh and also the same Physics Settings.

Hey TJ Ballard.
I tried to reproduce the issue but I couldn’t succeed as of now. It seems like its only broken in my project and not the 4.14 release. I have also tested it now inside the first person template with migration of the same meshes and actors I use in my project.

It’s a quite small ball which I activate with a button press to recieve 3.000 Impulse. In my project it always goes straight through the wall.

If I try the same Actors in the first-person example with the same meshes, everything works as it should.

I even tried to copy all ProjectSettings from the First-Person example to my existing project to see if it helps, but still nothing works. I am not sure how I can give you a test project since I can’t reproduce it with the same settings, meshes and actors. Its a very small sphere withe a SphereCollision of 4.235669 Radius.
The Physics Setting of my Actor are:

The collision settings are:

The project Physics Settings are:

They are the same in both Projects. I will further try to reproduce my issue but as of now it only seems to be broken in my game.

I tried to migrate the whole map with just the Mesh and Actor in it and even in the first-person project it doesn’t work now. So it seems the issue is somehow inside the map? In the first-person example I can switch between the testmap and my migrated map and only have problems in the migrated map.

Hey again TJ Ballard. I have successfully be able to reproduce the issue after migrating one of my maps to the Example-Project.
For your information in the Content/Maps folder are two different maps now. One migrated from my projekt and the other one is the orignal 4.14 first person example map. You can Shoot balls and I also got an already placed ball which shoots when you press right mouse button. So there are different types of tests you can do. The Error is definetly inside of the map and I don’t know why. I didn’t knew that Maps could contain Physics/Collision information which would break the global physics?

Anyhow.
This is how it looks on the migrated map and also my project.

This is how it looks on the original map from the example:

115287-original_map.jpg

You can check it out for yourself, I have uploaded this Test-Project on Dropbox.

[DropBoxLink][3]

I hope you can find out whats wrong with it and how to fix it. Maybe something goes wrong on the migration process from 4.13 to 4.14 when updating the project.

Thanks for the test project. I could indeed reproduce it with the map you mentioned. I’m not sure why it is only affecting that map though. There were significant changes to physx in 4.14 and I’m sure that has something to do with it, but since it is only affecting your project it wouldn’t be possible for us to implement a fix engine side.

With that said, I believe I found a workaround that should fix it. You are using ‘UseComplexCollisionAsSimple’ on the course mesh. We generally recommend not using this setting in a physics heavy game. Even with CCD enabled, it isn’t always reliable and even more so if the FPS fluctuates. I recommend creating custom collision for the meshes or building collision using the ‘Collision’ dropdown in the static mesh editor. Doing this seemed to completely fix the clipping issue for me.

Let me know if that will work for you.

Cheers,

TJ

Hey TJ, thanks for your answer.
I have tried numerous attemps to somehow fix this in 4.14 but nothing seems to work with complex collisions. I have “UseComplexCollisionAsSimple” activated since it allows me to have highly accurate physic simulations with highly complex models like ramps, curves, holes and so on which is not easy to do with custom collisions and/or collisions inside the static mesh editor.

Its true that it does fix the clipping issues tho, but I just haven’t found a good way yet to create accurate custom collisions which can represent rounded objects in an accurate way which algin perfectly with the mesh.
I also tried building my maps new from the ground up and the first test seemed promising, but after a while I get the same clipping issues as before and on various different lanes. Some work, some just stop working which is very, very strange. And that without copying a single thing from the “broken” maps and playing everything from the content browser.

Currently it seems like I have to stick with 4.13 where CCD and complex collision are working just fine. Which also is a shame, since the 4.14 CCD on kinematic objects allowed me to have a very good hit-reg in VR, where 4.13 was lacking and could clip more easily in VR.
I really hope I am not the only one with this kind of issue, as hopefully more people with physics based games are switching to 4.14 so this issue could potentially be fixed with an engine update. It seems to have something to do with ccd and complexcollisionsassimple combined in 4.14. It may seem sometimes to work on meshes but it can somehow break and stop working. At least thats what I think is happening. Otherwise I couldn’t explain why it works on a newly created map and after just adding more assets stop working. There is either something seriously broken with PhysX in 4.14, or my projekt is seriously broken.

But still, thanks for your help!

Additionaly I have found that when ComplexCollisions are active the clipping varies depending on the amount of polys. For instance, even on broken maps:

The Ball nearly always goes through the right side. But the left side is perfekt and can not be penetrated.

I’m running into this same issue in my project. It’s a VR title where you can pick up and throw units around the world, but after upgrading to 4.14 the ragdolls will easily fly straight through the ground. In 4.13 we just had to enable CCD on the skeletal mesh component and it worked perfectly.

Is there any way to get an engine fix for this scheduled for an upcoming hotfix? There are some critical fixes and features in 4.14 that we desperately want to upgrade to take advantage of, but this physics bug is a showstopper for us.

Hi. We’re having the same issue. I managed to narrow down the problem in the physx library code. It seems that the CCD sweep in physx 3.4 fails to determine the impact point most of the times. I’m still investigating on why this is happening.

Hi, glad I am not the only one with the problem. Hope you/epic can figure something out about why this is happening and how to possibly fix it! :slight_smile: I Unfortunatly I am lacking knowledge on engine programming to investigate by myself.

Hey, currently also experiencing this issue as we have recently moved to 4.14 as the Nvidia frameworks is now part of that Engine. However, I’ve noticed that collision seem to be a little broken, in the same way that is mentioned here - Did you find anything in your investigations?

Hi. I did find a fix. I’m not sure if it’s not the proper solution to the problem but it seems to work for us, and NVidia didn’t offer an alternative fix until now. What I did was to change the physx library code in order to reduce the threshold at which CCD kicks in, while also setting the CCD sweep geometry margin to zero.link text

I’ve attached our changes. You can compare the files with the ones from the physx library. But please keep in mind that this might not be the proper fix and might cause other bugs that I am not aware of.

Cheers

Hey, thanks for those files. I implemented them into one of our builds, however found that some objects still roll into each other. For example, I have two balls rolling out of a shoot. When they get to the bottom of the chute, sometimes the balls go within each other and eventually fire one out of the chute.

I also tried 4.15 and still get a similar issue. I have even added a lot of friction to the balls roll down slowly, but even then there are still times the collision doesn’t seem to work and the balls will roll into one another.

This also seemed to solve it for me as well. At least so far.