Rotating RigidBody2Ds...

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Footurist

Man, I am really struggling with RigidBody2Ds. In this case I have a RigidBody2D as a child of a Node2D. The Node2D is rotating and the RigidBody2D with it, that’s fine. However, as soon as I use apply_impulse it just returns to it’s initial rotation point, which is zero. What’s happening?

:bust_in_silhouette: Reply From: hilfazer

Bug’s happening:

GOD, thanks so much. I literally went crazy about this.

Footurist | 2018-02-17 22:05

But…is there a relatively convinient workaround?

Footurist | 2018-02-17 22:21

Try setting the RigidBody2D’s angular acceleration to rotate it instead. Then, applying an impulse to it won’t reset its rotation.

Beamer159 | 2018-02-17 22:42

Thanks, but this is extremely inconvenient for pointing RigidBody2Ds to the mouse position. There must be something else. :confused:

Footurist | 2018-02-17 23:14

:bust_in_silhouette: Reply From: Footurist

This is solved. I ended up using global rotation, which is apparently not affected by the bug.