Announcement

Collapse
No announcement yet.

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

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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.

    Cheers

    #2
    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 .

    Click image for larger version

Name:	tag.jpg
Views:	1
Size:	110.9 KB
ID:	1106498

    Comment


      #3
      Originally posted by mhnoni View Post
      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 .

      [ATTACH=CONFIG]93551[/ATTACH]
      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.

      Comment


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

        Comment

        Working...
        X