Motorcycle shakes heavily at low (30) FPS

Our motorcycle is shaking heavily while at low FPS. This includes at 30 FPS, which some platforms are capped at.

This happens on all platforms that run at 30 FPS.

I don’t know what is causing this or how I can fix that.

We are using 4.27 with PhysX.

We have a `USimpleWheeledVehicleMovementComponent` with two wheels.

The tire config has a friction scale of 3.

[Image Removed]

[Image Removed]

[Attachment Removed]

Hi,

This isn’t a known issue we’ve observed before at this framerate. Have you been able to identify what causes the motion to jitter? Nvidia provide a debugging tool “PVD” for inspecting physics scenes which should report more information about the constraint and collision solve that is happening within this scene. The source code for PhysX is also available in the depot at “Engine/Source/ThirdParty/PhysX3/PhysX_3.4/” to aid in debugging PhysX issues. If the constraints aren’t able to converge to a solution in the given timeframe it may result in some jitter, increasing the iterations on the physics scene or enabling substepping may help reduce this.

Thanks,

Benn.

[Attachment Removed]

If enabling substepping helps but iterations do not - is your framerate stable? Physics simulation will perform much better with a consistent dt each frame and substepping will divide the provided time up into potentially more consistent blocks.

PVD is a tool provided by Nvidia and you should be able to find it available through their website. It should allow you to see things like contact forces, collisions and dynamic body properties directly and record a capture you can use to debug your physics setup.

[Attachment Removed]

If the debug information from PVD isn’t showing a cause but you are seeing unexplained transform changes in the tool that might point to something outside of the physics simulation modifying the body directly and setting its pose. Do you have any systems that assume any control over the vehicles that may be conflicting with the simulation? It looks like the file upload wasn’t successful as I’m not able to see a file.

[Attachment Removed]

Sorry about the file upload issues, I’m escalating that issue up to see if we can resolve that.

The next steps I’d look into for tracking this down would be:

  • Step through the PVD capture to find a frame that initiates the shaking behaviour.
  • Inspect the bodies dynamic properties before and after to see if the physics simulation is the culprit for the induced jitter
    • If this is the case the full source code for PhysX is available in the Third Party directory, including the vehicle extension if that is what you are using. Narrowing down what could be happening inside the physics engine might help better understand a solution
    • Graphing things like linear/angular velocities, net impulses etc. for the bodies can help highlight spikes in those values over time
  • If the jitter is being created external to the physics engine then there’s a number of systems to inspect. Are there any animations that have a bearing on any inputs to the physics system? Are there any other gameplay systems driving those bodies? Is there any fluctuation in the amount of torque you are applying to keep the vehicle upright on or around the frames that initiate the jitter?

If you are able to isolate a reproduction case in a vanilla project then we might also be able to take a look and advise on potential causes.

[Attachment Removed]

Hej,

Enabling substepping does fix the issue.

The problem is, that this issue happens at lower FPS, so on platforms that aren’t that performant. Furthermore the feature is marked as experimental.

We won’t be able to just enable that.

Where do I find PVD?

Increasing the iteration count doesn’t change anything. Even if I set them to 50. Right now they are to 8.

I don’t know what is causing this.

We don’t have that problem at all with our cars.

For example, if I increase the wheel classe’s “Suspension Natural Frequency” from 7 to 10, then the effect is much worse.

Reducing the value below 7 doesn’t improve the issue.

[Attachment Removed]

Hej,

the framerate is very stable. I’ve clamped the framerate to 30 fps on my machine and I could run the game at 120.

I’ve installed PVD and run the game with it.

I don’t see any forces in PVD though…

I’ve attached the captured scene.

I first drive around at 60 FPS then stop and change the max FPS to 30.

[Attachment Removed]

Hej,

With “I don’t see any forces” I mean that I don’t see forces at all in PVD.

I’ve attached the zip file again.

I’m using regular forces to hold the motorcycle upright (“AddTorqueInRadians()”).

Edit:

The file upload doesn’t work anymore on this side…

It’s a zip file that is only 65 MB

[Attachment Removed]