HI there,
I know this is simple one but I lack terminology to search myself
So, in BP how to detect if player looks at pre-determined object (actor, pawn) to perform farther actions on this object?
Thanks
HI there,
I know this is simple one but I lack terminology to search myself
So, in BP how to detect if player looks at pre-determined object (actor, pawn) to perform farther actions on this object?
Thanks
“Trace” or “Line Trace” i think there something for mouse too, checks if there a actor in specific line and you can get object reference of that actor and do something with it.
I would recommend doing a Sphere Trace, which essentially makes a capsule along the length of a given line (vector). If the trace hits something (if something enters the capsule), the trace can output what it was that it hit. You can then cast the result to the type of object you want to be looking at, and if the cast is successful, perform your next operation.
Cool! Works as charm. Thank you
Thanks! Turns out trace is what I need
Cheers