Back to search
PatternGold tierInteraction

Line trace from camera to detect what player is looking at

Updated 6mo ago
UE 5.3UE 5.4UE 5.5UE 5.6UE 5.7#trace#raycast#camera#look#interact#detect

Reference

Pattern: GetPlayerController → GetPlayerViewPoint(outputs Location,Rotation) → GetForwardVector(Rotation) → Multiply_VectorFloat(A=Forward, B=TraceDistance) → Add_VectorVector(A=CameraLocation, B=Offset) → LineTraceByChannel(Start=CameraLocation, End=TraceEnd). GetPlayerViewPoint exec in='execute', exec out='then', outputs: 'Location' (Vector) and 'Rotation' (Rotator).