Vehicle Chassis - Hill lag and relating Y-axis lag

The goal for this topic: Patch the constant lag while driving steeply on the Y axis (hills).

This ~10 second video demonstrates how the vehicle chassis will start lagging the client when it goes up the hills. I already found a tacky, yet working solution. Removing the body, but keeping the chassis intact.

Since I knew the body was heavily effecting the performance on the chassis, I had to go on the DevForum and search through every single topic that covered this. None of the solutions worked.

I have tried:

  • Setting Descendants (Unions and BaseParts) of the Body model’s density to 0.01
  • Toggled “Massless” to TRUE
  • Both options at the same time
  • Increasing density on wheels

Once again, the client starts lagging when going up a hill, deleting the body would fix the issue which indicates the real problem. This is also common upon A-Chassis, going up steep hills on A-Chassis could also cause client lag.

(If you’d like to try this yourself, please find a transit bus model that has enough parts to benchmark. Then make a steep hill with archmedes.)

3 Likes

In order to find the issue, we need to see some of the code that’s causing issues. You can find the code that’s taking the longest to run by using microprofiler labels.

2 Likes

are you using :SetNetworkOwner()?
What are you using to move the car?
Does the bus has suspension?
How many parts the bus has?
We can’t help you if we’re blind

Yes, the car/vehicle has suspension. It’s using HingeConstraints on the REAR wheels of the vehicle. Part count is heavy, about ~500-1k. Vehicle runs smoothly when it’s on a flat surface.

I’ll try to create a demo model with an open-sourced bus model so you can try it out. Currently, the drive script for this is private.

All the drive script is doing is setting Max Acceleration and Motor Speed. The drive script is running in a client environment (localscript).

Yes, SetNetworkOwner is used here, also used in the mentioned a-chassis.

Once again, code is private sourced, but I’ll create a demo model with an open-sourced vehicle to demonstrate the same problem.

Please refer to the last reply I’ve posted.

I’m having the same issue. Have you found a fix StrawberryNutt0621

No, I have not found a fix unfortunately, this is still in effect with a lot of chassis that I’ve tried.
Vehicles with high part counts like 1k+ parts are more easier to cause lag on hills.

I have this issue even on flat, their shouldnt be so much physics needing to be rendered since its all welded :no_mouth:

I’ve resolved it by turning off collisions on the entire body except for the base frame. :slight_smile: