Perception - Sight
I am trying to implement AI Perception - Sight into my game. The game is a type of tower defense, with enemy characters that walk on the ground towards a specified goal. I would like to make them see the towers then decide if it should fight or avoid.
However, I can't seem to get consistent responses from the perception component. I have 'AI Perception' component on my Enemy AI Controller, set it to Sight and have set the config to include all 3 "team" members, Neutral, Enemy, Friend (as mentioned by @mieszko). I have added the AI Perception Stimuli Source to the Super parent of my towers and set it to Sight.
I ensure the Stimuli Source is registered, both by Register Node as well as the default 'Auto Register' (and I have also attempted altering these to see if something would work.)
As far as I can tell, everything is setup like it should be. When I play and test everything out, some times it will see the tower(s) and sometimes it won't, which leads me to believe I have everything setup as it should be, because it will on occasion see the placement. I'll even set 3 of the same placement side by side and sometimes it sees some of them but ignores the others right next to it.
In the first 2 pictures you will notice that it sees different objects under the exact same conditions (nothing changed except a new game instance.) Worth noting that sometimes it won't see any of them.
And in this final image, you will notice that while it saw 3/4 of the objects, it broke sight after getting a little closer (denoted by the broken green lines that go from the object to behind the enemy.)
If it makes a difference, these assets aren't loaded into the game on start. They are placed in the world by the player.
Please let me know if I'm doing something wrong or if this is a possible bug? I'm not sure how/why it would be a bug unless it came in 4.10.1 because I've tried to do exactly like was done in the Training Twitch by Ian, Alexander and Mieszko where they added perception using I believe only 4.10.0. So I'm not sure if something possibly went wrong with the update. This project was created fresh in 4.10.1 and not migrated up from a previous version.
asked Jan 12 '16 at 04:23 AM in Bug Reports
The sight sense uses as a default
An easy way to see if this is the issue would be to replace your tower meshes with the default sphere mesh, and see if that fixes things.
answered Jan 25 '16 at 06:34 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here