I have a simple game done using unreal engine 4, The turret of the tank should turn toward the player pawn. I made the blueprints code to build that, but the turret rotates quickly and incorrectly.
I tried to solve the problem many times without any results !! Hope to help me.
There are probably a few ways you can do this, but you can simplify this quite a bit. I also suspect you can do all of it in the animation blueprint.
Find Look At Rotation
node.RInterp To
node and connect its output rotator to a Set World Rotation
node. The nice thing about the 'RInterp To' node is that you can set the speed. For a bit more realism you could use some simple maths to accelerate and decelerate the turret's rotation.The key parts to this are the Find Look At Rotation
and RInterp To
nodes, and to do all of it in the animation BP.