If looking at an object and object name is X then do Y

Hi Guys,

I am wondering if anyone could point me in the right direction for doing something like this:

If player is looking at an object, and the object name is X then do action Y, if object name is Y then do action Z and so on.

I send a trace to an object and can perform the above for one object but kind of struggle with the concept of how this can be done with multiple objects of the same kind and getting multiple different results in blueprints.

Sorry, I am a noob.


from the break of your hit get the hit actor node and get branch then Boolean of == tag , make sure you put tag on every actor of x and y and so on from the detail panel of your actor .


Hi, I tried it but it looks like the branch conditionality doesn’t work for me.
Basically, what I am trying to do is to to initiate an action when a player is looking at an object and a touch button is pressed. It’s either display some info on screen or make the camera move to a different location.
I have attached a screenshot. Can you see anything that may be causing the problem here?
I have added Portal1, Portal2 tags to two cylinders in the scene that are set to be invisible in-game.

Thanks very much.

this tutorial should give you what you need . https://www.youtube.com/watch?v=7wPhrve_vTA