![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | Newby |
i want a sprite to keep spinning in one direction
![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | Newby |
i want a sprite to keep spinning in one direction
![]() |
Reply From: | Zylann |
You can use a simple script:
extends Sprite
func _process(delta):
# Note: put a minus sign to spin in the opposite direction
var degrees_per_second = 360.0
rotate(delta * deg2rad(degrees_per_second))
You can also use an AnimationPlayer
and animate the sprite’s rotation with a looping animation.