Godot Version
4.5.1.stable
Question
For some unholy reason, a line seems to just be ignored. The line of code which it’s used for just doesn’t work. Here’s the code:
var currentshot = Vector2(0,0)
currentshot.x = targetx - global_position.x
currentshot.y = targety - global_position.y
currentshot = currentshot.normalized()*3
currentshot.rotated(PI/18)
print(currentshot.angle())
currentshot.rotated(-1*cycle*PI/90)
print(currentshot.angle())
for n in 2:
glo.bulletvector = currentshot.rotated((PI/10)-(n*PI/5))
print(glo.bulletvector.angle())
var shotinstance2 = bulletbullet.instantiate()
For some reason, the second rotation simply fails to go through. I tried having it be part of the first rotation, but no dice. The problem persists regardless of the situation of the cycle variable.