but imagine that the turret moves really slowly, and the bullet moves really fast, by the time it takes the turret to rotate to the angle at which linearaim gives on the first tick, the position it needs to fire at will have changed, and so will the linearaim expesssion, so it will have to keep rotating more, and won't actually get to the point on time.
What I'm proposing is to make it work out exactly what is the best angle to fire at after (i suppose) x ticks that it will take to rotate to that position.
As long as the speed of the target stays constant, so will the angle it's meant to be firing at.
You might be right, I havent tested if that works, this is just my intuition, not sure if its necessary at all. It just seems to me that the current expression assumes that rotation is instant.