I want to Clamp the coordinates so that my soldiers in the game will move in the direction of the arrow, but only move within the red area, but cannot go beyond the red zone, so how should I code the Clamp? please help! Thank you!
Maybe show your movement code. Usually the enemy goes toward a point and perhaps avoids obstacles if you are using Godot navigation.
Hihi...(o)! B ecause I am not very familiar with navigation. So I'm going to do this. So according to this picture, how do I clamp so that the turret is only allowed to rotate within that range?
Are you manually setting the rotating angle? If so, use the clamp method: https://docs.godotengine.org/en/stable/classes/class_@gdscript.html?#class-gdscript-method-clamp