If rotation <= 270 && rotation >= 90

Godot Version



i am trying make it if rotation <= 270 && rotation >= 90 to say true but it doesn’t.
here the code:

extends Node2D

# Called when the node enters the scene tree for the first time.
func _ready():
	pass # Replace with function body.

# Called every frame. 'delta' is the elapsed time since the previous frame.
func _physics_process(delta):

func _process(delta):
	if rotation <= 270 && rotation >= 90:
		print("The conditions are true.")
		print("The conditions are not true.")

yeah because rotation is in Radians, not Degrees, also rotation can rotate more than 1 times, meaning it can go over 360 rotation degree and less than -360

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