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

[3.x] Do not set gravity and damping when Custom Integrator is enabled. #62708

Merged
merged 1 commit into from
Jul 7, 2022

Conversation

madmiraal
Copy link
Contributor

3.x version of #42650.

Fixes #40508.

@rburing
Copy link
Member

rburing commented Jul 4, 2022

The code itself looks good. Could you just explain why putting it here guarantees that it is always run? (I'm not that familiar with the Bullet physics server.)

@madmiraal
Copy link
Contributor Author

As specified in the docs when custom_integrator is enabled:

internal force integration will be disabled (like gravity or air friction) for this body.

This is where internal gravity and air friction force integration is calculated, so this PR simply checks whether custom_integrator (Godot renames this variable internally to omit_force_integration) is enabled, and, if so, sets the internal force to zero (in case it's not) and returns.

@akien-mga akien-mga merged commit 600c1c4 into godotengine:3.x Jul 7, 2022
@akien-mga
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

3 participants