Open MrMinimal opened 3 years ago
I'm not sure why, but it works if you change the default damp values in the project settings' physics category to zero. This is supposed to be overridden by the vehicle's RigidBody values, but they seem to be ignored.
This is related to #42842, and the issue happens only in Bullet. It works as expected when switching the 3D physics engine to Godot Physics.
This is related to #42842, and the issue happens only in Bullet. It works as expected when switching the 3D physics engine to Godot Physics.
I agree that the linked issue is the cause for the loss in velocity but switching to Godot Physics doesn't fix it. Bullet and Godot Physics both behave the same in this demo.
@MrMinimal In the linked MRP, damping is set to -1 in VehicleBody
, which means the default value from the world is used (0.1):
https://docs.godotengine.org/en/stable/classes/class_rigidbody.html#class-rigidbody-property-linear-damp
It works as expected with GodotPhysics when setting the damping value to 0 in either the VehicleBody
node or project settings.
With Bullet, the VehicleBody
overriden value is actually added to the world default value, so you need to set the project settings value to 0 to allow the vehicle to bounce infinitely (due to #42842).
@pouleyKetchoupp That's a good workaround but until #42842 is closed, I still consider this a bug. There are projects where you don't want to touch the project settings because that influences other nodes.
Godot version: 3.2.3-stable
OS/device including version: Linux
Issue description: A bouncing VehicleBody looses its jump energy after a couple of jumps with dampening set to 0.
Expected behaviour: The vehicle should keep bouncing indefinitely.
Steps to reproduce:
Minimal reproduction project: bouncy_demo.zip