screen shots of the set up would be helpful, so many things could be an issue
Also from the sound of it you want the AI to basically see a “block” an un-possessed actor, not a pawn, not a character, just another actor… I’m not sure that’s how AI “perception” works. It’s meant to detect “controllable” actors not just a simple static mesh. What are you trying to do with AI perception and a static mesh?
No, that’s going to be something you script yourself using blueprints or a behavior tree. I have never heard of using AI perception in that way. Unless I’m mistaken it was an improvement on “pawn sensing” and that was as the name implies an ability to “sense” other pawns in the world. AI perception improved upon that back end code and added more features and customizability but I don’t think what you’re looking for is going to be handled by AI perception
So a quick look through documentation and maybe it’s possible, although at other points it seems they are talking specifically about pawns. Either way I suggest uploading screen shots so the community can get a better idea of what we are working with.
I have a basic AI Perception sight attached to an AI-possessed pawn. In the debug mode (with the perception mode turned on) it shows that the AI can see the player, but it can’t see two other simple actors I’ve put into the scene. Those actors are just regular subclasses of Actor with a Static Mesh and nothing special. I’ve done everything how every tutorial (and the docs) says to do it, what am I missing? Thanks!
Essentially, I have food, which is an unpossessed Static Mesh, and I want the AI to go towards it and eat it when it sees it. I thought that’s what AI Perception was for.
if i were you i would look into using EQS which is a system pretty much made for this type of situation. EQS stands for environment query system. it basically is a way for ai to figure out what around it.
the other option would be to do like nebula said and script the behavior. you could do this pretty easily using a cone shaped mesh and overlap events to get the same result as if you were using pawn sensing.
Thanks I was trying to get AI to register a sound of impact that a projectile makes on hit but couldn’t for the life of me figure it out, and wasn’t even thinking it couldn’t detect uncontrolled actors! Eye opening and cheers to this whole thread
AI perception by default detects all pawns without further setup required. For all other actors to be perceived, you need to register them as stimuli source. To do this, add a AIPerceptionStimuliSource component to an actor that you want your AI to perceive. Add all senses you want an AI Perception Component to react to and enable “Auto Register as Source” on this component. This component also allows you to register and unregister an actor at runtime.
The pawn class does not have this component and will be detected by default. if you wanted to disable automatic detection of pawns without that component, add the following lines to your DefaultGame.ini: