Timeline for Aiming Down Sight is making Camera go to wrong location

So do you want to have the camera stay on the weapon during ADS and then return to the 3rd person view or do you have a 1st person position in mind for the relaxed stance?

Are you updating HipfireLocation? Take into account that the camera boom has it’s own parameters such as length that need to be changed. It would be better to probably un-parent the camera from the boom while in ads or you may be fighting it’s movement.

If you decide on keeping it then once you leave ads you need to set the same parameters for the spring arm and camera location as before ads’ing.

Also make sure you are not messing up local space and world space.
GetSocketLocation returns the coordinates in world space so you would need to transform it to local space if you want to use retrelativelocation.

#include "Kismet/KismetMathLibrary.h"

Convert location from local to world space:

FVector UKismetMathLibrary::TransformLocation(const FTransform& T, FVector Location)

Convert location from world to local space:

FVector UKismetMathLibrary::InverseTransformLocation(const FTransform& T, FVector Location)

or easier

So you would probably need this:

FVector ADSTransform = GetTransform().InverseTransformPosition(GetEquippedWeapon()->GetWeaponMesh()->GetSocketLocation(TEXT("ADS_View")));

to get the relative transform, or just do the calculations in world space :slight_smile:

Try going into an outside view and debug drawing spheres at the projected target coordinates to see where they line up in space. (set a longer persistent time and bind it to a keypress for tests)