I'm making a sort of Nuclear Throne tribute and have enemies with guns which act as turrets and turn towards the player's position when in line of sight then fire every few seconds (randomised with a timer). The problem I have is that the guns sometimes point the right way at the player (muzzle first) and sometimes the other way (stock first). I can't spot a pattern for when it happens and sometimes an enemy will switch between the two during the course of a game. However, the bullet always fires in the right direction.
The guns are set to an image point on the enemy every tick (I've also tried pinning) and told to acquire the player as a target when the player is within their line of site and unacquire when not. The guns themselves have both the line of sight and the turret behaviours.
Any help greatly appreciated!