AITank rotation issues

Hi peeps,

I am having a bit of an issue with my AI tanks where the turrets are rotating around to the where the player tank is but then carry on rotating around.
I have put a UE_Log in the Tank.cpp AimAt function to check what value was being passed through the HitLocation, but this presented the correct numbers of where my playerTank was situated.
I have worked step by step through the process starting from TankAIController and followed it all the way through to the TankTurret.cpp where the rotation is set but I can’t find anything obvious that would allow the turret to keep rotating despite it having already reached the rotation of where my playerTank is.

I am not sure if this makes a whole lot of sense? I was thinking it may be something to do with the fact that the turrets seem to turn the long way around and I was going to attempt to fix that but then I remembered that Ben said he would come to that on the second cycle.

Privacy & Terms