I have a physics marble that the player can control/roll by applying angular force. The physics object is a simple sphere collider with a no collision mesh attached to it. Instead of using the gravity setting, I am using an “Add Force” node to better control gravity direction -
I am encountering an issue when I roll the marble down a steep ramp; it will make it partly down the ramp and then suddenly freezes in place and cannot get unstuck. I can still apply my angular forces to it to make it spin but it seems to just be stuck. It does not appear to be penetrating the ramp at all, but I suspect this might be what is happening.
Additionally, the marble catches on mesh triangles, even when the surface is theoretically flat.
In this screenshot you can see a path of impact normals - note how there is a small spot on the right which represents the marble unintentionally colliding with a mesh edge, which makes it act like its bouncing off the edge.
Does anyone know ways to fix this?
CCD is enabled, Using Unreal Engine 5.0
I have tried changing (to no avail):
- Contact offsets
- Depenetration values
- Various physics error correction values
- Substepping (this can actually fix both issues, but tanks framerate)
- Disabling CCD (no longer gets stuck but will still hit unexpected “bumps” on flat surfaces)
I am somewhat trying to recreate the physics from the old Marble Blast games, they seemed like they worked perfectly even in levels where your marble was travelling insanely fast. Thanks in advance for assistance!