How? I’ve tried registering the pawn as a stimuli source and setting detecting to detect neutrals, friendlies and enemies but my soldiers still aren’t detecting other soldiers.
When you are registering the pawn as a stimuli source, are you ensuring that you are selecting a sense for it to be registered for? Also, are you ensuring to check the Auto Register as Source box?
Here is an image of how mine looks:
hey Sean, I just found out that I was setting detect friendlies in the parent but not the child controller class, so it got overwritten by the child. Silly mistake, but do you also happen to know if there’s a quick way to make perception update more often then just if you enter or leave the perception ?
Also do you know how enemy, friendly, and neutral are determined, where is the logic for that set, can we set it in blueprint, and what is the default logic for it?
The Detection by Affiliation is currently not implemented, which means you’ll need to have all 3 checked in order for the Perception to work properly.
It could be helpful if you could provide an example of why you would want to update the perception more often? OnPerceptionUpdate is called whenever a sense is triggered. You could create a new function that is called whenever you need and have it perform whatever logic that you’d like it to perform.
For one example I must know is sight perception detection radius based or is it radius based and visibility traced, for example if i’m in the FOV for detection but a wall is between me and my enemy, do I still get detected or not due to the wall blocking a visibility trace?
one example I have as to why I need it is my AI have a move to point to get them out of their monster closet, I have perception component start with tick enabled set to false, when they reach their point I turn it on, but sometimes they fail to detect a target if it’s already in front of them in their FOV when it’s tick is enabled, and I have to run to the border of the FOV and return to be detected (to get the perception update event to run) If I was able to make the perception update every tick with successfully sensed as 1 I would be able to check if the target was sensed. But I did notice there is a get perceived actors node, does that return only actors that are successfully sensed with that sense? So could I hypothetically use that?
The wall will most likely block the sight perception as long as it is set up to do so in its collision settings.
Get Perceived Actors does return actors that have been successfully sensed.
Here’s the documentation on the node for reference: Get Perceived Actors | Unreal Engine Documentation
As far as them not detecting when you set Tick Enabled to true, go ahead and log a separate Answerhub post for that in the Bug Reports section. I’d like to spend some time investigating that, as it sounds like it could be a potential bug. When you have created the new post, provide the link here so I can be sure to start looking into the issue as soon as possible.
Thank you.
Ok great thanks
Here is the link to the question Missed perception - AI - Epic Developer Community Forums
The Detection by Affiliation doesn’t work in the “Add AI Perception Component” Blueprint node. How do I set them all to true?