Rolling ball jumps on flat surface

Is there any update to this? Or does anybody know if you can add multiple physical materials to a single object to create “zones” of friction? For me that’s why I have multiple objects lined up but if I could create a “friction map” that would work too

Fixed in 4.22.3 seems to be best impimentation yet (for me )
Paul G

As of 4.23 they do

            const float RestOffset = ComputeRestOffset(Elem);
            const float ContactOffset = ComputeContactOffset(Geom) + RestOffset;
            VisitorFunc(Elem, Geom, PLocalPose, ContactOffset, RestOffset);

It seems like each Elem (Body Element?) has its own RestOffset but I see no way to edit that in editor but maybe it takes it from min/max contact offsets?

In which case this should be working as it did before but even in 4.23 my physics isn’t as stable as it was in 4.19 which is why I was reading through this and commenting here.

Assuming an element can be a PxShape then setResetoffset has this description.

/**
\brief Sets the rest offset.

Two shapes will come to rest at a distance equal to the sum of their restOffset values. If the restOffset is 0, they should converge to touching
exactly. Having a restOffset greater than zero is useful to have objects slide smoothly, so that they do not get hung up on irregularities of
each others’ surfaces.

<b>Default:</b> 0.0f

<b>Sleeping:</b> Does <b>NOT</b> wake the associated actor up automatically.

\param[in] restOffset <b>Range:</b> (-PX_MAX_F32, contactOffset)

@see getRestOffset setContactOffset
*/

And FKShapeElem has a RestOffset which says

/** Offset used when generating contact points. This allows you to smooth out
the Minkowski sum by radius R. Useful for making objects slide smoothly
on top of irregularities */

I’m just not sure if the contact settings in the editor modifies these or not. I guess I’ll play with higher values and see what happens. I was on the lower .01 and .05 min/max in 4.19 working fine but in 4.23 getting bounciness again.

Then again there is a ComputeContactOffset which I’d think uses the settings from editor but the ComputeRestOffset uses… IDK yet.

Also states its been fixed hereissues.unrealengine.com/issue/UE-68523

But it isn’t in the release branch yet.

For those coming here in search of a solution, in 4.23.x (and probably later versions as well) you need to set the Min and Max Contact Offset inside Project Settings → Physics to very small values (e.g. 0.0001 and 0.001 respectively). No need to activate CCD or physics sub-stepping.

I’m experiencing the same issue with version 4.24.3. The change in contact offset just let a bit higher rolling speed, but my wheels getting bumps around speed 12m/s (~46km/h) on flat surface.
Is anybody has description about how possible to modify the earlier mentioned PhysicsGeometryPhysX.cpp ? Thanks for any answer.

Just wanted to create a thread here and then see the problem right at the top. :smiley: Oh, boy. The settings helped me in 4.24. Thanks for that.

If it hasn’t been written yet. What I also noticed is that the height of the ball changes when you move between two meshes that are the same height. Shouldn’t happen.

https://www…com/watch?v=OeYMQPIXJxU

So, I’m still having an issue with this. I’ve got things set to where it’s not as “bad” as it has been, but still on a flat surface (single cube or terrain) it will still intermittently jump like it’s hitting a rock! Any thoughts?

So, I just built another map and only put one cube in it for a long sort of “runway”. Added a player start and my pawn, which is a sphere and took off down the runway… there wasn’t any hint of a jump at all. Why then does it happen with a terrain (perfectly flat by the way)? Is this still a bug?

[=“xraygunner, post:50, topic:37461”]

So, I just built another map and only put one cube in it for a long sort of “runway”. Added a player start and my pawn, which is a sphere and took off down the runway… there wasn’t any hint of a jump at all. Why then does it happen with a terrain (perfectly flat by the way)? Is this still a bug?
[/]

If you are using 4.24 it could be the bug related to terrain contact offset. Check with 4.23, if it works there then you know.

I’ll give it a try. I went from 4.21 to 4.24, so who knows, lol!

[=“vr_marco, post:46, topic:37461”]

For those coming here in search of a solution, in 4.23.x (and probably later versions as well) you need to set the Min and Max Contact Offset inside Project Settings –> Physics to very small values (e.g. 0.0001 and 0.001 respectively). No need to activate CCD or physics sub-stepping.
[/]

Oh man, thank you so much. Can confirm this works in 4.24.2. I was pulling my hair out over this as it didn’t make sense to me why traveling on completely flat terrain was causing this behavior.

FarisR, I’m glad it’s working for you, but I’m still having issues with it. It doesn’t seem to matter what engine version I use. I’ve used 4.21.2, 4.23.1, and 4.24.3. I’ve tried all kinds of min and max offset values and just about every other setting in physics that I could. At best I’ve gotten it to a “small” bump, but it is never eliminated.

[=“xraygunner, post:54, topic:37461”]

FarisR, I’m glad it’s working for you, but I’m still having issues with it. It doesn’t seem to matter what engine version I use. I’ve used 4.21.2, 4.23.1, and 4.24.3. I’ve tried all kinds of min and max offset values and just about every other setting in physics that I could. At best I’ve gotten it to a “small” bump, but it is never eliminated.
[/]

For that to work correctly the surface you are rolling onto must also be free of gaps and edges. What is your ball rolling onto?

Just a plain UE landscape. I’ve tried it on a completely flat one and one that had some very gradual slopes. Same thing.

I’ve got the same problem as xraygunner, tweaking the MaxContactOffset helped a lot but I am still experiencing bumpiness quite often, I can minimize the bumps to the point that they’re hardly a problem in the editor, but the values I would like to use for MaxContactOffset cause the collision to stop working altogether when I package builds of the project.

In my project, a basic sphere collider is sliding along a large terrain and sometimes will also slide on a BSP or on a standard cube asset. The sphere is being driven by directional physics forces and impulses.

Is anyone else experiencing this or similar?

Here we go, this is a short video showing what’s going on. I can put details up here about my physics settings for the project and for the Pawn, if necessary. https://www.dropbox.com/s/6y54goxizz…orums.mkv?dl=0 But like I said before, I’ve tried different versions of the engine and a broad spectrum of settings with little impact. I’ve even tried to see if the textures were doing it, but even when they are stripped it still does it… BTW, I’m not hitting the jump button in the video.

I would just like to update, that what I thought was fixed actually wasn’t. It had just decreased the frequency and I just so happened to get lucky with where I was traversing. The problem persists in 4.24 (which is when I posted initially) and 4.25.Also, same thing in 4.19 (I just installed and checked)

So, now with Chaos implemented I tried my project with the latest 4.25 and it’s still there. I’m guessing that this bug is low priority, and so I’m left wondering if maybe it would just be worth it to hack my way through this? Like I said a few posts up, that I’m only seeing a problem with a landscape. If I create a cube or a blocking volume, I don’t seem to have any issues… but I guess I’d have to try it full scale to be sure. Any other thoughts out there before I make a mess of things?

[=“xraygunner, post:60, topic:37461”]

So, now with Chaos implemented I tried my project with the latest 4.25 and it’s still there. I’m guessing that this bug is low priority, and so I’m left wondering if maybe it would just be worth it to hack my way through this? Like I said a few posts up, that I’m only seeing a problem with a landscape. If I create a cube or a blocking volume, I don’t seem to have any issues… but I guess I’d have to try it full scale to be sure. Any other thoughts out there before I make a mess of things?
[/]

There is an ongoing bug with landscape collisions (4.24 and also 4.25 afaik). That may explain it.

How is input being added to the ball?
it seems to me like input is the cause of the ball lifting in the shared video.
otherwise, if you make a sphere and simulate physics on it it should show a jump by navigating the same area.
in which case you need to make sure the LOD0 is the one used for collision on landscape in case you haven’t already.
sub step should be on, because its physics.
Hope that helps.