RigidBody2D stops any movement while Tweening

Godot Version

Godot 4.0.3


When tweening the rotation of my RigidBody2D, its movement which I added through velocity stops during Tweening and continues after the Tween is finished.

How can I keep the RigidBody moving during the Tween? And if I can’t, what other solutions are there for rotating smoothly without a Tween?

Setting the angle on a rigid body directly instead of using angular velocity and torque could cause some unexpected consequences. That said the reason it is stopping could just be because the tween is affecting the entire transform2d rather than just the rotation.

If you want a more robust way to smoothly rotate a rigid body, try using a tween to update a custom property like target_rotation and then in _physics_process or _integrate_forces use apply_torque_implulse to have the body attempt to follow the intended rotation. Doing it like that allows the physics engine to simulate the object rotating and how it might effect or be effected by other rigid bodies or interact with the static objects such as the floor or walls.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.