Advertisement
BeneFager

Untitled

Jan 11th, 2022
264
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.36 KB | None | 0 0
  1. //For interacting with the mouse
  2. void URInteractComponent::InteractPressed()
  3. {
  4.     TraceForward(GetOwner()->GetActorLocation(),Camera->GetForwardVector());
  5.     if (FocusedActor && bShouldInteract)
  6.     {
  7.         IInteractInterface* Interface = Cast<IInteractInterface>(FocusedActor);
  8.         if (Interface)
  9.         {
  10.             Interface->Execute_OnInteract(FocusedActor, GetOwner());
  11.         }
  12.     }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement