Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | i.want.to.die |
how to point a rigidbody2d to point at it’s velocity , the node has it’s velocity given by its parent through aapplied_impulse
this is the whole line of code
selected_spell_instance.apply_impulse(Vector2(), Vector2(spell_speed, 0).rotated(rotation
+ rand_range(-trembeling,trembeling)))
the selected_spell_instance is the node i added as a child , and the trembeling is a little quirk for the node to shoot in a little different direction everytime
and then i apply the rotation to the node
selected_spell_instance.rotation = rotation