-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Removing a rigidbody and re-adding it to the scene results in errors and the rigidbody disappearing #10074
Comments
How is the rigidbody disappearing? Is it flying through the terrain maybe? |
I'm able to reproduce in 7ac50b5 |
for those who read issues only from email: it seems like after readding its in proper position for one frame, and then it's falling down extremely fast (around one-two godot meters per single frame). And yes through terrain as well. |
Not sure what the problem exactly is but those errors only reveal an existing buggy behavior. Removing those won't fix the underlying bug. |
I agree that the error messages should not be removed and that they are only symptoms of the problem. I said something similar in my original post, but I apologize if I wasn't clear enough. |
Yeah, what I wanted to say is that I don't think things were working totally correctly in earlier releases. |
According to my definition of "totally correct" it was. I ran the project above on 9cdd364 (i just picked an early version of 3.0 at random) and it behaved as expected. The rigidbody dropped, was removed, was readded, and it continued dropping without errors at the same velocity that it was removed at. |
Sorry .. I fat-fingered the close issue button 😄 |
If everything was completely OK, there wouldn't be a singular matrix though |
I think we are in agreement then. Again, I am not asserting that the problem is the error messages. I am asserting that recent changes in godot resulted in issues that were not there in the past ( Just to prove my point, I backported the current matrix3.cpp to 9cdd364 and there still weren't any validation errors or behavior changes in the demo project above, which should mean that at that point in time, there was nothing wrong with the transform's basis. |
Just gave it a quick try with gdb, the axis and angle are apparently NaN.
|
Now the shape in the physics server is unbound only when it's unparented from its body, because if it's unbound when just exiting the tree, a later readd would have the body shapeless in the server. It's the same currently being done in 2D physics. Fixes godotengine#10074.
Please check #10365. Without it, after re-adding the body, |
Everything is working great now on my end. Thanks everyone! |
Operating system or device - Godot version:
Arch Linux - 211dfa6
Issue description:
Whenever I remove a RigidBody (with mode == RigidBody.MODE_RIGID) from a scene, then re-add it to the scene, I get the following errors (spammed repeatedly):
The rigidbody also disappears.
The errors are there for transform validation and I agree that they should be there, but I would expect a rigidbody removed from the tree with a valid transform to re-enter the tree with a valid transform. This wasn't an issue in older versions of godot (early 3.0 and 2.1) and it breaks key functionality in my game. This feels like a common use of rigidbodies, so I'm guessing I won't be the only one affected.
Steps to reproduce:
Link to minimal example project:
rigidbody_readd.zip
The text was updated successfully, but these errors were encountered: