Knowledge base
Knowledge base
Knowledge base
Free, anonymous browsing of Unreal Engine Blueprint examples, node references, and best practices. The same content the WoalzCraft plugin uses to generate Blueprints.
20 results for linetrace
UKismetSystemLibrary::LineTraceSingle. WorldContextObject is hidden. End pin is world position, not direction.
Line Trace By ChannelUE 5.4, 5.7updated 2mo agoTraceChannel: ETraceTypeQuery::TraceTypeQuery1=Visibility, TraceTypeQuery2=Camera. DrawDebugType: None/ForOneFrame/ForDuration/Persistent.
LineTraceByChannelUE 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoPattern: 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).
Multi Line Trace By ChannelUE 5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoPattern: BPI_Interactable interface with Interact(APawn* Caller) and GetInteractText(). Player Tick: GetPlayerCameraManager → GetCameraLocation/Rotation → LineTraceSingle(CamLoc, CamLoc + Forward*InteractDistance) → BreakHitResult → HitActor → DoesImplementInterface(BPI_Interactable) → True: show UI prompt, store as FocusedActor. Interact input → call Interact(Self) on FocusedActor.
Pattern: Input trigger → LineTraceSingle(CameraLocation, CameraLocation + ForwardVector * Distance, Visibility, false, MakeArray(Self), None) → Branch(ReturnValue) → True: BreakHitResult → HitActor → CastTo InteractableInterface → call Interact. End pin is world POSITION not direction. Use DrawDebugType ForOneFrame during dev.
Pattern: LineTraceByChannel → Branch(hit=true) → BreakHitResult → SpawnSystemAtLocation(SystemTemplate=NS_Impact, Location=ImpactPoint, Rotation=MakeRotFromX(ImpactNormal), Scale=(1,1,1), bAutoDestroy=true). Use MakeRotFromX with ImpactNormal to orient effect to surface normal. NS_ prefix is convention for Niagara Systems. SpawnSystemAtLocation is in UNiagaraFunctionLibrary. bAutoDestroy=true means the component cleans itself up after the effect completes.
UKismetSystemLibrary::DrawDebugLine.
Draw Debug LineUE 5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoAPlayerController method. Great for click-to-interact games.
Get Hit Result Under Cursor By ChannelUE 5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoBox Trace By ChannelUE 5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo ago