Hi… i have learned how to use pawn sensing… and it sees my character very effectively which i am playing with… thats good…
But, How one AI can sense other AICharacters around it ??
And also, is there a way to sense the objects around AI? for instance “targetpoints” ?? like we can give tags to all objects and tell it to sense whenever it sees that taged object in front of it. (i dont know how to use tags either… its just a thought)
thing is i have some 500 target points and i dont think tracking the distance of all of them is a good idea?
So, Is there is an option to sense the objects in front of AICharacter as long as its certain distance away? just like it sees pawns??
Something like this can work:
Add a collision geometry, for example a sphere or a box to the AI character. Set its size large enough, and you can check the overlapping actors with this primitive. Try to cast them into “targetpoints”.
Most likely you should turn off collision when you don’t need it, but I think then you have to call something like UpdateCollisions after enabling (SetCollisionEnabled with NoPhysics), before calling GetOverlappingActors.