Announcement

Collapse
No announcement yet.

Detect Actor/AI în view when player has seen it

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

    Detect Actor/AI în view when player has seen it

    Hi guys,

    I'm having difficulties in managing to detect my AI character once the player has seen it.
    Basically what I want is once the player sees the AI (I'm having a third person camera), an event is triggered.
    I manged to detect the AI using a line trace and the event is triggered but this is happening only if the line trace is spot on the AI and, if for example my AI Character is not directly on my line trace and is in other areas on screen (I can still see it), I'm not detecting it.

    Do you have any advice on how can I do this in blueprints?

    Thank you in advance

    #2
    add a collision component to your character the radius you want to be able to "see" the npc. then in the overlap event set a variable i bet if you watch this tutorial series it can help you.
    he does this to make an npc and player character able to interact.


    https://www.youtube.com/watch?v=oK-9...gTUyl976_TW1hj
    Matt Walton: Programmer and owner of WireLiteSoft Games.

    [Streaming Terrains][WireLiteSoft.us]

    Comment


      #3
      Hi Frostic,

      I'm not having problems in detecting the AI. I already have a trigger in the AI for which I can set the distance so the player interacts with it and the event fires, my problem is detecting the AI when I visually see it on screen.

      For example, right now the AI has a collision trigger which is set to a distance, the event is fired based on that trigger, so when the player enters in that trigger everything is fine.
      But, I want to be able to fire that event immediately when I visually see the AI on screen (only when AI is not covered by environment objects). For example, the AI character appears from a cover, that's when I see it so that's when I want to trigger that event.

      Thanks

      Comment

      Working...
      X