In Shooting Game (Unreal Learning Project)
i found create line trace start location function.
// use player's camera
FRotator UnusedRot;
PC->GetPlayerViewPoint(OutStartTrace, UnusedRot);
// Adjust trace so there is nothing blocking the ray between the camera and the pawn, and calculate distance from adjusted start
OutStartTrace = OutStartTrace + AimDir * ((GetInstigator()->GetActorLocation() - OutStartTrace) | AimDir);
- GetInstigator() is Owner of this camera. (Player)
- AimDir is GetPlayerViewPoint(vector,rotator) , AimDir = rotator.Vector() <<<<
in last line. what is ’ | ’ operation purpose?..
please let me know :x