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

RigidBodies can exit Areas with space_overrides without their gravity vectors being reset #41743

Closed
tcoxon opened this issue Sep 3, 2020 · 0 comments · Fixed by #42061
Closed

Comments

@tcoxon
Copy link
Contributor

tcoxon commented Sep 3, 2020

Godot version:
3.2.2

OS/device including version:
Ubuntu Linux 16.04, 64-bit
GeForce GTX 970 with NVIDIA 384.130 driver
GLES3 backend
Bullet Physics

Issue description:
In 3.1 and 3.2.2, RigidBodies can exit Areas with Replace-Combine space overrides without their gravity vectors being reset.

Steps to reproduce:
The attached reproducer has two overlapping 3D Areas with Replace-Combine space overrides. They have opposite-pointing gravity vectors and a reduced value for gravity. The cube, a RigidBody is supposed to gently 'bob' at the boundary between them like an object floating on the surface of water.

The capsule in the scene is a KinematicBody that can be controlled with the arrow keys. If you move the KinematicBody to collide with the bobbing RigidBody as it surfaces, the RigidBody levitates out of the Areas without its gravity vectors being reset to the global gravity.

The RigidBody's direct state total_gravity is shown in the label at the top left of the window. When it erroneously levitates out it displays the gravity vector given to it by the bottom-most Area (that it no longer overlaps).

image

Global gravity is set to 100, so the label should say (0, -100, 0).

(Note that in the latest commit on the 3.2 branch 9bf5a0b, there seems to be some other issue that prevents gravity from being altered by the areas in the reproducer at all.)

Minimal reproduction project:
AreaReplaceCombine.zip

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

Successfully merging a pull request may close this issue.

3 participants