I want to rotate the windmill on press of a key and just keep it playing, even if I'm not pressing the key
And If I press it again, it will stop rotating
Currently, I'm using this:
func _physics_process(delta):
rotate_z(0.01)
I tried:
var isRotate: bool = false
func _physics_process(delta):
if Input.is_action_pressed("off") and isRotate:
rotate_z(0)
else:
rotate_z(0.01)
thank you for anyone who is willing to help!