Articles by: Carlos Pardo Vimes

AI Sight Perception to Custom Points

AI Sight Perception to Custom Points

In this post, Unreal Engine Developer course student Carlos shares his awesome detective work (and code) on getting AI sight perception to custom points… On the way to creating a metal gear solid clone game, I was following the testing grounds videos. I already had guards with Sight sense to detect me. At a certain point I put some barriers, what should then happen is that NPC shouldn’t see me standing up. But what I got was that the NPC was detecting me, which is wrong. I thought maybe the AI Sight perception only sees the actor location (only one point). I started to search for the answer, I asked on gamedev.tv and the Unreal engine forum. Someone suggested I add a sphere collision to the head, add this sphere into a collision channel. It didn’t work, so I continued searching. I googled “Unreal engine 4 head perception” and found this link in this page someone said that I should implement IAISightTargetInterface and override theĀ CanBeSeenFrom method. So, i tried: First include and implements IAISightTargetInterface in the .h file of the character class:

Then on the public part of my class add the definition of the method:

And then [ā€¦]

Read More