Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | rubendw03 |
Hey, I’m making a topdown shooter and i wanted to make the gun that rotates around the player flip when it’s rotated to the left. I basically checked if its rotation was between PI/2 and -PI/2 but this doesn’t work. It only flips when its on the topleft of the player.
here"s my code:
func _process(delta):
flip_v = PI/2 > pivotrotation and pivotrotation < -PI/2