I'm seeing inconsistent rotation behavior using apply_impulse()
to a RigidBody2D. Using this simple code:
extends RigidBody2D
func _ready():
set_process_input(true)
apply_impulse(Vector2(-10, 0), Vector2(0, -200))
func _input(event):
if event.is_action_pressed("ui_select"):
apply_impulse(Vector2(-10, 0), Vector2(0, -200))
As you can see, the apply_impulse()
has an offset, so the body should rotate in response. However, when the scene is run, the body does move upward but without any rotation. The same apply_impulse()
when run from the _input()
function does result in rotation.
I noticed this because I had similar inconsistent rotation response when using apply_impulse()
in other functions. Anyone run across this before?