Announcement

Collapse
No announcement yet.

AI Perception WTF?

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

    AI Perception WTF?

    I made a simple AI using AI Perception component and it seemed to work quite well but then I noticed that the AI can't sense me anymore when I'm behind ANY object even if it is microscopic. It's ridiculous that I can hide behind a toothpick without being seen.In this way my AI is basically useless because it's sooo easy to hide from it. Some time ago I read that the best way to build a perception system for a npc was using AI Perception Component and now I'm stuck for this stupid problem...What should I do? Is there a way to fix this lack or I need to use something else instead of AI Perception component?
    Last edited by Fiorenzone; 01-14-2017, 12:53 PM.

    #2
    Unless its been changed, the AI perception only checks if it can see the center of the player. If you want to change that behavior, you would have to do some c++ coding. Or you could easily create your own perception system within blueprints (its more or less just line traces).
    Logitech Wheel Plugin

    Comment


      #3
      uff.. ok thanks for your answer

      Comment


        #4
        Pretty simple solution, have a component on both the left and right side of your pawn, if either of those are spotted then code the AI to spot the owning player of those components. Now if any part of your player is visible the AI will go hostile.

        We're all here to help, try without the WTF next time :P

        Comment


          #5
          ahahah yes sorry about that. Anyway is there a way to keep my configuration? I'm using the AI Perception component on the AI Controller and on perception update it does a lot of operations and it also cast to other blueprints but if it's coded to search for the center of a target like drb1992 said I really don't know where to start to accomplish what you wrote without removing AI Perception component. If there's no really way to keep it intact I'll replace it with line traces to make it work like you said but I hope this won't be necessary

          Comment


            #6
            So what you do is you have a second blueprint class. In this class is a perception component. Now on your player class you add 2 childActorComponent, placing them at each side of your doctor. Now because those are separate actors themselves you can have the AI require perceiving either one of them, which replaces which replaces the perception component on Pawn actor itself

            Comment


              #7
              Thank you very much for your time in the end I fixed adding some retriggerable delays so now it takes more time before the npc reaction from losing me from his sight. My AI will be coded to run away so unless a player decides to hide behind a blade of grass while chasing him there won't be any problem.

              Comment


                #8
                The problem I'm running into is the AI perception component doesn't work in a development or Shipping build.

                Twitter | UE4 Marketplace

                Comment

                Working...
                X