Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bullet] Bouncing vehicle loses velocity #47273

Open
Tracked by #45022
MrMinimal opened this issue Mar 22, 2021 · 5 comments
Open
Tracked by #45022

[Bullet] Bouncing vehicle loses velocity #47273

MrMinimal opened this issue Mar 22, 2021 · 5 comments

Comments

@MrMinimal
Copy link
Contributor

Godot version:
3.2.3-stable

OS/device including version:
Linux

image

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:

  1. Open demo project
  2. Run the project
  3. Observe the vehicle jump and the wheels leave the ground
  4. After ~16 jumps the vehicle doesn't have enough energy to leave the ground anymore

Minimal reproduction project:
bouncy_demo.zip

@fire fire changed the title Bouncing vehicle looses velocity Bouncing vehicle loses velocity Mar 22, 2021
@Cykyrios
Copy link
Contributor

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.

@pouleyKetchoupp pouleyKetchoupp changed the title Bouncing vehicle loses velocity [Bullet] Bouncing vehicle loses velocity Mar 24, 2021
@pouleyKetchoupp
Copy link
Contributor

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.

@MrMinimal
Copy link
Contributor Author

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.

@pouleyKetchoupp
Copy link
Contributor

@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).

@MrMinimal
Copy link
Contributor Author

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants