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, Bullet] SoftBody is translated to world origin upon setting physics_enabled to true #75412

Open
needleful opened this issue Mar 28, 2023 · 0 comments

Comments

@needleful
Copy link
Contributor

Godot version

3.5.2.stable.official and 3.6.beta (commit befdafd)

System information

Windows 10, GLES3

Issue description

For a 3D softbody, if physics_process is set to false in the editor, setting it to true in-game will cause the mesh to be translated to the world origin, except for vertices pinned to an object, permanently deforming the softbody.
There seem to be more complicated triggers for this issue, such as removing and re-adding a softbody to the tree when physics_enabled is false, which I suspect are from the same underlying issue.

The scenario I'm using this for is having softbodies disabled when they're initially loaded and only enabling them when the player is nearby, for cosmetic effects such as flags and curtains. I can work around it by starting with the physics enabled and disabling after a small amount of time.

Steps to reproduce

Create a softbody with a mesh.
Move it somewhere other than the origin
Set "physics_enabled" to false in the editor.
In-game, set physics_enabled to true and observe the softbody move to the origin.

Minimal reproduction project

softbody.zip
In this project, physics can be enabled for all the softbodies by pressing space.
It also demonstrates a workaround where the physics are enabled briefly at the start of the scene.

@lawnjelly lawnjelly added this to the 3.x milestone Mar 28, 2023
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

2 participants