Download

Aim Assist

Hello everyone,
i want to add aim assist on First Person Demo example but i don’t have any idea where to start. Is there any tutorials about it or does anyone has any suggestions?

P.S.: I can use blueprints if it’s easier to implement.

Well depending on the system you are trying to implement, there are serveral ways to do it.

2 possible implementations come to mind:

  1. Angle between camera direction and direction you want to aim
  2. 2D projection and screen distance approach

Angle difference

just find the the camera direction that would be required to look directly at the point. Using


FVector AimAssistedViewDirection = (CameraLocation - AimPointLocation).GetSafeNormal()

then compute the DotProduct between the AimAssistedViewDirection and the normalized Camera Rotation Vector. If the result of the dot product is in a certain threshold just add a little rotation towards the aimassistedviewdirection per tick and you should be done.

2D projection method

Project the point’s world location to your screen using Canvas->Project or the Blueprint function ConvertWorldLocationToScreenLocation (accessible from PlayerController). Now you know where the aim location is located on your screen and how far your crosshair is away from it. From here you can proceed as in the last point. Just add a Rotation to your ControlRotation to move the crosshair to the projected point.