Rotating 3D(Ish) Sprite

I am making a tower defence game and I have a sprite thats kind of 3D in the angle it has been rendered (see attachment). I have an issue that I cannot figure out how to solve.

I need to rotate the sprite smoothly to face the enemy it is firing at. At the moment it gets the angle between the turret and the enemy and sets the sprite for that angle, so if the angle was 140 degrees i would play the 140 degrees firing sequence. The problem with this is it will jump straight to that angle so if the last place the turret fired was at 270 degrees and the next enemy is at 120 degrees it will jump straight to that angle.

Any ideas how I can rotate the turret every 5 degrees between the last played sequence and the sequence for the next angle before the tower begins firing? So last played is 270 i need to go to 140 so i would play the frames for 265, 260, 255…150, 145, 140

Think I have got an answer to this, now i need to vary the speed between turning and firing

-- Replace with current tower angle current\_angle = towerArrayCannon[rectID].currentangle -- when new target appears -- Replace with current target angle local target\_angle = 140 local delta = (target\_angle - current\_angle + 180) % 360 - 180 -- Now: -180 \<= delta \< 180 step = delta \< 0 and -5 or 5 number\_of\_steps = delta / step ready\_to\_fire = false -- inside "draw" function ready\_to\_fire = number\_of\_steps == 0 if not ready\_to\_fire then current\_angle = (current\_angle + step) % 360 number\_of\_steps = number\_of\_steps - 1 -- play the sequence towerArrayCannon[rectID]:setSequence( current\_angle ) towerArrayCannon[rectID]:play() towerArrayCannon[rectID].currentangle = current\_angle end

Think I have got an answer to this, now i need to vary the speed between turning and firing

-- Replace with current tower angle current\_angle = towerArrayCannon[rectID].currentangle -- when new target appears -- Replace with current target angle local target\_angle = 140 local delta = (target\_angle - current\_angle + 180) % 360 - 180 -- Now: -180 \<= delta \< 180 step = delta \< 0 and -5 or 5 number\_of\_steps = delta / step ready\_to\_fire = false -- inside "draw" function ready\_to\_fire = number\_of\_steps == 0 if not ready\_to\_fire then current\_angle = (current\_angle + step) % 360 number\_of\_steps = number\_of\_steps - 1 -- play the sequence towerArrayCannon[rectID]:setSequence( current\_angle ) towerArrayCannon[rectID]:play() towerArrayCannon[rectID].currentangle = current\_angle end