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

HingeJoints stop working when the scene containing them is reparented #41398

Closed
Tracked by #45333
tcoxon opened this issue Aug 20, 2020 · 4 comments · Fixed by #58641
Closed
Tracked by #45333

HingeJoints stop working when the scene containing them is reparented #41398

tcoxon opened this issue Aug 20, 2020 · 4 comments · Fixed by #58641

Comments

@tcoxon
Copy link
Contributor

tcoxon commented Aug 20, 2020

Godot version:
3.2.2, but also reproduced in upcoming 3.2.3, in commit 9bf5a0b on the 3.2 branch

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

Issue description:
Removing a scene containing a HingeJoint from the tree and then re-adding it causes the HingeJoint to stop working.

Steps to reproduce:

  1. Run the reproducer
  2. Observe the brown beam at the back of the scene swinging in the XZ plane, on a hinge
  3. Press space bar to remove the scene from the tree for a split second
  4. Observe that the brown beam collapses and falls out of the plane. The hinge is no longer affecting it

Minimal reproduction project:
Physics-RemovedNodes.zip

The Reproducer scene contains a number of physics bodies:

  1. A green CSGBox providing a static collision
  2. A brown beam (a RigidBody on a HingeJoint) that is central to this issue
  3. A white capsule (a KinematicBody) scripted to move back and forth, pushing the beam back on its hinge
  4. The other elements of the scene are not relevant to this issue (they're for '_body_enter_tree: Condition "!E" is true' errors when a scene containing an Area is removed and re-added to the tree #41397)

When you press space, the scene is scripted to:

  1. Pause the tree
  2. Remove itself from the tree root
  3. Wait 0.1 seconds (which may not be necessary?)
  4. Then re-add itself to the root and unpause the tree
@akien-mga akien-mga added this to the 4.0 milestone Aug 21, 2020
@akien-mga
Copy link
Member

CC @madmiraal @AndreaCatania

@WilliamTambellini
Copy link

@akien-mga could you please flag that one for a 3.2 bug fix release ?

@akien-mga
Copy link
Member

Any bugfix relevant for the 3.2 branch will be considered once there is a fix (the PR gets the cherrypick:3.2 label).

@madmiraal
Copy link
Contributor

madmiraal commented Dec 18, 2020

Related to #25689 and #31711

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.

5 participants