-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
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
The Rigidbody2D cannot rotate after set the CollisionShape2D disabled first and enabled later #30551
Comments
Unable to reproduce with latest build, seems already fixed. |
So how to use the latest API in Godot 3.1 stable version to solve this bug? |
Not stable version, just built with latest master source code. See here to build it https://docs.godotengine.org/en/3.1/development/compiling/index.html |
There are also daily nightly binaries here. |
Had the same issue disabling and enabling the collision shape. I can confirm that it is fixed on a nightly build. |
Fixed in 3.2. |
Hello, I am using the version 3.2.2 and I have exactly the same problem. I cannot apply torque forces when the collision shape is disabled. Any solution? Thanks. |
@lukepass Please create a new issue with a minimal reproduction project attached. |
The Rigidbody2D cannot rotate if you disable the collision shape and then enable it again. But it's fine if you do nothing to the collision shape.
Godot version:
3.1.1
OS/device including version:
Windows 10
Issue description:
The rotation by
apply_torque_impulse
of the RigidBody2D may work incorrectly in Godot 3.1.1.If you never disable the collision shape of the RigidBody2D, everything is normal, but if you first disable the shape use
$CollisionShape2D.set_deferred('disabled', true)
then after some events trigger and set it enabled with$CollisionShape2D.set_deferred('disabled', false)
, then the rotation looks like "broken", the node can only work withapply_central_impulse
but no effect withapply_torque_impulse
now.Steps to reproduce:
The code above works fine, but you cannot rotate with the code below:
This is not the actual code but for the test is enough, and I upload the very little represented project in Github: https://github.com/spkingr/test-git/tree/master/SpaceShipRotation
Minimal reproduction project:
https://github.com/spkingr/test-git/tree/master/SpaceShipRotation
The images:
The text was updated successfully, but these errors were encountered: