Functionality that confirms if the player has looked at an item/character

Hi
Im looking to have a score system if a player looks at a certain item or character.
Any suggestions/examples in blueprints on how I could implement this?

Thanks

S

What do you intend, when you say “look”? Bringing the object in the player’s field of view? Or an “inspect” system?

Just capturing when the player has seen something in his field of vision :smile:

Here you go:



This code goes inside your targeted object, probably not best to run this on tick. You can use a timer with a slow rate (0.2 or something) or just slow down the tick. It can have a significant impact on performance if lots of objects are running this code.

You can copy this into your BP to get the nodes.

PS: This is UE 4.26, if the nodes don’t appear in UE 5, try searching for them separately in that version.

Edit: Bug in code, fixed it. If this works for you, please mark it as the answer, thanks.

thanks I will get on to this :slight_smile:

1 Like

Please mark it as the solution if my answer helped you so that the post can be tagged as resolved