Have a turret rotate towards crosshair?
What's a good way to have a turret rotate towards a crosshair?
asked Apr 26 '15 at 05:12 PM in Blueprint Scripting
Here's the solution.
answered Apr 27 '15 at 08:44 PM
You should use "Make Rot From X" node. The input vector for this node should be (crosshair_location - turret_location). The output will be Rotator which you can youse for SetActorRotation node. You may also use just yaw component if you meet some issues or need only z-axis rotation (just use MakeRotation node and get yaw from your obtained rotator and other components form your turret's original rotation)
It may look like this:
Hope that helps.
answered Apr 26 '15 at 05:26 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here