This works really well for player turns. When a projectile is fired, it gets its orientation from the target world position and the shooter world position.
However, this feature often does not work properly when it is the enemy AI’s turn.
The debug log in the 4th photo shows that the vector calculated through the two world positions has a magnitude of zero. Also, after the player unit is killed, I can see the debug log as like in the 5th image. From all of this, I can infer that the value of the shooter position is not updated during the enemy AI’s turn. How can I fix this?