Does the rotation look a little strange by any chance? It will work better if you get the current rotation before going into the timeline, rather than sampling it during.
Anyway… the clamp node is your friend. You can make sure the rotation values stay within certain bounds.
Essentially, Dot Product is an answer to most angular issues. The yellow arrow indicates the turret’s front.
Oh, and a TL is probably not the way to go about it unless you’re after something truly specific / unique / inflexible. Does not mesh well with target tracking in my head.
You need to run this on Tick. If we want to see an update every frame (the animation), we need to interpolate every frame - that’s what the Timelines’ Update does as well. Interpolation relies on the data from the previous step.
Can’t recall how often Pawn sensing updates by default? Once a second, maybe twice. So you’d need to Sense the Pawn → Open the Gate for Tick so the script runs only when a Pawn is nearby - you could probably use the VisionRadius or whatshername.
This is based on Distance from the Player but, ideally, should also incorporate the angle so the whole thing switches off (disable Tick, mayhap?) when the player is far away and outside of the vision cone. The vision cone is already calculated so you could leverage that.
But ofc, you may have a different idea as to when the turret’s target seeking script kicks in!