How to print a line when the needle finish rotating 360 degrees?

Godot Version

4.2.1

Question

Hi everyone :heart_eyes: I’m hoping to stop Needle2 when it finishes rotating one full circle. How should I go about this? Right now I’m using .rotate(delta)

Reference: https://youtu.be/2PaevLIQPCg?si=ozAvVoXwTwAv7PXx&t=33

Can someone please help? Thanks :pray:

The scene:

you can try to detect the rotation using .rotation

something like this:

func rotate_needle(delta: float) -> void:
	if (_ispressed == false && needle_2.rotation <= 360):
		needle_2.rotate(delta * _rotation_speed)

Thanks! It worked!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.