Physics simulating balls get stuck in wall (Pinball game)

Youtube Video showing issue

As you can see in the video, the issue is balls getting stuck in the left and right collision volumes. It appears to happen when balls collide right next to it, the physics places the ball into the block, and it just can’t seem to get out.

Things I’ve already tried to fix this:

  • Both the balls’ static mesh components and the red collision volumes are using CCD.
  • I’ve turned physics substepping up to it’s slider max of 16.
  • I’ve increased the balls’ position and velocity solver iteration counts to 40 and 12 respectively,
  • Max Depenetration Velocity is at 0.0, so no max, but setting it to 50 made the balls shoot through the other side rather than get stuck.
  • Changing network relevancy has no effect.
  • Disabling “Replicates Movement” doesn’t stop it from happening on the owning client.
  • Changing the Tick Group seems to have no effect either.

Important notes: It’s worst when replication is taking place. The balls are only spawned on the server, and are marked to replicate movement.

If it would be better to replace the balls with some sort of projectile rather than a physics object I can try that, but if there’ some physics settings I can adjust to fix this it would be preferred.

Moments after posting the question, I ‘stumbled’ onto a fix that -seems- to be working. Under Project Settings/ Engine/ Physics/ Framerate, I had already turned Max Substeps up to 16 (max), but hadn’t turned down Max Substep Delta Time. By reducing that to it’s minimum of 0.0013, the problem doesn’t appear to be happening any more. So… yay!

1 Like

Did you ever find out what this was?
Ive put subset to 6 default but I also turned it all the way down to minimum and it caused my CCD to stop sticking on my golfball. No idea why?!
Im looking into it now.

As mentioned in the post above, reducing “Max Substep Delta Time” helped. By decreasing that (thereby increasing the frequency of substep checks) and increasing the Max Substeps (which also increases the accuracy of physics movement checks) it helped reduce the issue of physics balls getting stuck in walls.

That said, part of it for me has been an issue with multiplayer replication latency, so it became important to handle all authoritive simulation on a player’s local machine for their area. Then I had to send the final locations of the balls to the server to update other players.