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] Bullet physics adds the default damping values instead of setting them #46650

Open
Tracked by #45022
e344fde6bf opened this issue Mar 4, 2021 · 3 comments
Open
Tracked by #45022

Comments

@e344fde6bf
Copy link
Contributor

e344fde6bf commented Mar 4, 2021

Godot version:
3.2.3.stable

OS/device including version:
N/A

Issue description:

Bullet adds the default linear/angular damping values instead of setting them. This issue doesn't occur when using Godot physics backend.

Bug is probably from here:

// Add default gravity and damping from space.
if (!stopped) {
newGravity += space->get_gravity_direction() * space->get_gravity_magnitude();
newLinearDamp += space->get_linear_damp();
newAngularDamp += space->get_angular_damp();
}

Steps to reproduce:

  • Create a rigid body and set its linear damping value to 0
  • Inside physics process PhysicsServer.body_get_direct_state(get_rid()).total_linear_damp is now set to 0.1 (this is the default linear damping set inside project settings)

Minimal reproduction project:
bullet-damping-bug.zip

@Calinou
Copy link
Member

Calinou commented Mar 4, 2021

Related to #42842.

@pouleyKetchoupp pouleyKetchoupp changed the title Bullet physics adds the default damping values instead of setting them [Bullet] Bullet physics adds the default damping values instead of setting them Mar 4, 2021
@JestemStefan
Copy link
Contributor

I encounter this today. I'm not sure if it's the bug, but for sure it's inconsistent with what is written in docs

obraz

According to it any value different then -1 should override default damp setting, but in reality default damp value is added to local damp value (if local damp is bigger then 0).

The behaviour mentioned in the docs makes more sense

@Seubmarine
Copy link

We should change the doc or create a pull request were we change that

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