godot icon indicating copy to clipboard operation
godot copied to clipboard

Vehiclebody3D sliding down slope when parked

Open Griiimon opened this issue 1 year ago • 5 comments

Tested versions

  • Tested in 4.2.1 stable

System information

Windows 10 - Godot 4.2.1 stable - compatibility

Issue description

A Vehiclebody3D parked sideways on a slope will slide down. Depending on gravity, friction, roll influence and spring settings it will slide more or less but it will never stand still unless the gravity is 0. It's even possible with the right combination of settings to make the vehicle slide up the slope. This is without any engine force or steering applied!

slope demo

Steps to reproduce

Run the demo project

Minimal reproduction project (MRP)

VehicleBody Slope.zip

Griiimon avatar Feb 29 '24 05:02 Griiimon

Hello, I'm a computer engineering college student and would like to take up the fixing of this bug. Would that be alright and is there any more convenient way I can keep in contact if questions come up?

BaconLord avatar Mar 11 '24 16:03 BaconLord

Hello, I'm a computer engineering college student and would like to take up the fixing of this bug. Would that be alright and is there any more convenient way I can keep in contact if questions come up?

You are very welcome to fix this bug and post your progress or potential issues in this thread. But a fair warning: the physics side of Godot isn't well maintained and you will probably be more or less on your own with this. I think I read somewhere that the Vehiclebody was originally ported from the Bullet Physics source code..

Griiimon avatar Mar 16 '24 23:03 Griiimon

Hello, I'm a computer engineering college student and would like to take up the fixing of this bug. Would that be alright and is there any more convenient way I can keep in contact if questions come up?

You are very welcome to fix this bug and post your progress or potential issues in this thread. But a fair warning: the physics side of Godot isn't well maintained and you will probably be more or less on your own with this. I think I read somewhere that the Vehiclebody was originally ported from the Bullet Physics source code..

Sorry for the delay on my response. First of all thank you very much for the opportunity of working on this bug. Second of all I had a few questions regarding the expected result and standards of the godot engine:

  • Is the vehicle supposed to also not slide down when moving forward on a slope? Or is it only when parked?
  • Is there supposed to be a difference between a vehicle being still and a being parked or is it considered the same on the engine?
  • Is there any moment where it should be sliding (low friction floor for example) and should the traction of the vehicle be calculated with the vehicle as a whole or taking into account each tire it has?

Thank you for your time

BaconLord avatar Mar 23 '24 20:03 BaconLord

So I don't think I'm really qualified to answer that all. I have never contributed to the engine and don't know much about how it works internally or is supposed to worked. I just filed that bug report..

  • Is the vehicle supposed to also not slide down when moving forward on a slope? Or is it only when parked?

I think, from an end-user perspective, I don't want it to slide unless the friction of the surface is low. Like on ice, for example.

  • Is there supposed to be a difference between a vehicle being still and a being parked or is it considered the same on the engine?

I have no idea, but I think for all intents and purposes this can be handled the same.

  • Is there any moment where it should be sliding (low friction floor for example) and should the traction of the vehicle be calculated with the vehicle as a whole or taking into account each tire it has?

See above and I think it already does per wheel, but I might be wrong.

Griiimon avatar Mar 27 '24 00:03 Griiimon

Would love to see this fixed some day, seems to be gettings worse over time (tested on 4.4 dev)

Deltt avatar Oct 04 '24 00:10 Deltt

Not just sideways. If you're on a slope, vehicle will slide down, regardless of your angle. Engine is not calculating the gravity by checking the normal of the floor, therefore vehicle has to be on a perfectly flat ground to stand still.

dgsdestinygamestudios avatar Oct 10 '24 04:10 dgsdestinygamestudios

Just so this doesn't get picked up again, I have the unfortunate news that I was not able to fix this bug after a lot of different attempts. As I have ran out of ideas, I will have to drop this bug fix, sorry for the time I took in attempting to make it work and without response. If anyone wants to pick this up, I will gladly share notes of what I found that could perhaps help.

BaconLord avatar Oct 27 '24 20:10 BaconLord

@BaconLord

Just so this doesn't get picked up again, I have the unfortunate news that I was not able to fix this bug after a lot of different attempts. As I have ran out of ideas, I will have to drop this bug fix, sorry for the time I took in attempting to make it work and without response. If anyone wants to pick this up, I will gladly share notes of what I found that could perhaps help.

I've been looking into this for weeks now, please share! I'll try my go at it

Deltt avatar Dec 03 '24 03:12 Deltt

Sadly this is still an issue even using Jolt which is kinda surprising.

Damping doesn't help with the sliding. Playing with freeze and sleep on speed/input condition is my current workaround.

RphCos avatar Sep 15 '25 06:09 RphCos