So I have a line trace that shoots from the socket of my gun, however because i can’t get a forward direction for a socket, I get the forward direction of the camera however this shoots straight into the ground. Is there a way I can offset a forward direction or is there a way I can get the forward direction for the socket?
if(CanShoot)
{
FVector Start = InHandWeapon->GetSocketLocation("FirePoint");
FVector EndPoint = Start + (FPS_Cam->GetForwardVector() * ShotDistance);
FHitResult HitResult;
FCollisionQueryParams CQP;
CQP.AddIgnoredActor(this);
GetWorld()->LineTraceSingleByChannel(HitResult, Start, EndPoint, ECC_WorldDynamic, CQP);
}