Rolling ball jumps on flat surface

[=“, post:21, topic:37461”]

I can also confirm that the behavior has changed from 4.19 onwards and MaxContactOffset only has a limited impact. Looking at the source code it seems the problem comes from a line in FBodySetupShapeIterator::ForEachShape in BodySetup.cpp. In 4.19 it looked like this:


const float ContactOffset = ComputeContactOffset(Geom);

And in 4.20 it is this:


const float ContactOffset = FMath::Max(ComputeContactOffset(Geom), RestOffset + 1.f);

So the contact offset will never be able to go lower than 1 + whatever RestOffset is. I reverted this particular line of code with theone from 4.19 and that seemed to fix the problem.
[/]

and

[=“bybw, post:28, topic:37461”]

To fix this issue for the landscape, you will have to apply the same contact offset to the landscape collision shapes in ULandscapeHeightfieldCollisionComponent::OnCreatePhysicsState.

eg. HeightFieldShapeSync->setContactOffset(MaxContactOffset);

[/]

4.22.0 shows a whole different BodySetup.cpp file now. It looks almost completely rewritten. Thankyou for giving out this vital information to fix this long lasting Physics Issue. I thought I’d never get an answer to this. But still working on it… Right now I’m completely stuck on what to do and how to fix this for 4.22… I was hoping one of ya’ll can help look into that. Hope you guys can get back to me on this ASAP. This is crazy news to see we found some files that we can edit back to 4.19’s original state! :slight_smile: