I have one element, AI Sight perception and works fine but when I add a second element AI Sight perception, the second one doesn’t work! is that implemented like that intentionally in the engine?! I guess a second same perception doesn’t work for other perceptions too
Try printing a string on both the OnPerceptionUpdated and OnTargetPerceptionUpdated events. Why, exactly, do you need multiple stimuli of the same type?
Ok so I have one stimuli on player as sight, only implementing OnTargetPerceptionUpdated for AI. added two elements and both are Sight perception. tried to swipe my settings on each but always the second one doesn’t work. Or I think I’m missing to tell the programm I have two same type of perception as one, OnTargetPerceptionUpdated ?! print string fires off for both OnTargetPerceptionUpdated and OnPerceptionUpdated. Basically I want one sight perception in front of AI, one sight perception around with 180 degrees but in half range
What’s the specific reason for having two on a single AI? There’s probably an alternative that will be more performant.
Did you try implementing two AI Perception components in your AI controller? That seem like the only solution in Blueprint.
I tried but to the point where the perception is connected to my only one variable “Can See Player”, so couldn’t really get the two perceptions into the same set variable. tried setting my variable twice each for the two OnTargetPerceptionUpdated but somehow the second perception doesn’t work. even though it’s completely another AIPerception can you guys try it real quick on your part and confirm if that’s possible or not?
- Add two new AI Perception components and assign each a sight stimuli (with ‘detect neutrals’ checked!)
- Implement ‘OnTargetPerceptionUpdated’ events for both components.
- Create two boolean variables, e.g. ‘isTargetVisible’ and ‘isTargetNearby’, and set them on their corresponding events.
If these steps do not work, then debug with breakpoints and Print String nodes and report the results.