Current target actor

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

HAL9000

New Member
Jan 20, 2004
9
0
0
Hamburg, Germany
Hi!
I was wondering if there is an easy way to get a reference to the actor that is currently being targeted by the player. I want to write a function that enables the user to interact with an actor by moving the crosshair over it and pressing a button. Does anybody know how that works?
 

Vito

New Member
Mar 18, 2002
143
0
0
You can do traces from the center of the crosshairs, say, once per tick, or set up a lineofsight trigger if you only have specific things you want to interact with.
 

HAL9000

New Member
Jan 20, 2004
9
0
0
Hamburg, Germany
Ok, it took me a while to find the Actor.Trace function and figure out how to use it but it works fine now. Thanks a lot for your help.
 
Last edited: