It does not. If i call spin(1) it spins really fast for 1 second then stops. If i call spin(3) it spins for 3 seconds then stops. It looks like the 4th argument to tween_property doesn’t control the time it takes to reach the final state, it controls how long the tweening loops. Which is not what the docs say.
i have a similar method for scale that works as expected so i’m really confused.
The tween hits it’s target rotation, (should be TAU for your example) then the next “loop” the sprite is already at the target rotation. Use .from to specify the starting rotation
i spent an hour debugging and reading docs and Google posts. i was never going to guess TAU. Although the key to infinite loops was .from(0) which maybe i should have figured out. i was getting hung up on how the animation appeared to last as long as the duration no matter how small or large i set it.
Calling this method without arguments will make the Tween run infinitely, until either it is killed with kill, the Tween’s bound node is freed, or all the animated objects have been freed (which makes further animation impossible).
set_loops(0) or set_loops() will make it run forever. set_loops(1) is the normal run-once behaviour, the default parameter assumes one will only call set_loops when one wants the tween to loop.