So, I'm making a 2D shooting game where my character aims with the mouse. I added a Tween to make the aim movement smoother. The problem is that when my character aim to 360°, it becomes 0°, he then takes the long path and spins 360° in the opposite direction. How to solve that?

yea I know exactly what's causing this. It's the Tween "Tweening" from 360 to 0, but I can't figure how to solve it.

TIA!

Split the Tween into multiple Tween's so that you can control the direction of rotation.

    What's the code for your current Tween? Also state your Godot version.

      DaveTheCoder

      	tween.interpolate_property($weapon, "rotation_degrees",
      			$weapon.rotation_degrees, aiming_angle, 0.05,
      			Tween.TRANS_LINEAR, Tween.EASE_OUT)
      	tween.start()
      

      I'm using Godot 3.6

      I meant to do something like this. Choose initial_value, final_value1, final_value2 and final_value3 appropriately.
      You may need to change the TransitionType and EaseType parameters to keep the movement smooth.

      tween.interpolate_property($weapon, "rotation_degrees",
          initial_value, final_value1, 0.05 / 3.0,
          Tween.TRANS_LINEAR, Tween.EASE_OUT)
      tween.start()
      yield(tween, "tween_completed")
      
      tween.interpolate_property($weapon, "rotation_degrees",
          final_value1, final_value2, 0.05 / 3.0,
          Tween.TRANS_LINEAR, Tween.EASE_OUT)
      tween.start()
      yield(tween, "tween_completed")
      
      tween.interpolate_property($weapon, "rotation_degrees",
          final_value2, final_value3, 0.05 / 3.0,
          Tween.TRANS_LINEAR, Tween.EASE_OUT)
      tween.start()

      This is only something to try. I'm not sure that it's the correct solution.