This is a UE4 C++ tutorial video that shows you how to setup the "AIPerceptionComponent" in C++ and how to change the Sight Targets / View Targets for the perception system at runtime. #UE4 AI #AI Perception
Thoughts on setting it up to trace to multiple bones and depending how many it see's the strength of the detection + increase the strength of the detection if it see's the same bones or increasing amount of bones for an extended period of time. (Like if it can only trace to the right hand the initial strength is very low but if it continues to see the hand the strength increases ... and if it starts seeing more like the right arm it increases the strength alot more)
This should be simple to implement but such a complex detection system would be difficult to convey to the player......I watched a gdc talk on the human ai of the last of us and there they said that initially they tried complex detection models but it was too confusing for the players and the final version just uses 3 line traces either to the chest or the head
@@pranjalbhattacharjee5601 Similar to the discussion in the GDC Talk - Modeling AI Perception and Awareness in Splinter Cell: Blacklist I think my though boils down to if the AI can trace to your 1 bone because its showing through a slit or if its say you hand sticking out slightly you probably don't want it to react or at-least react quickly, but say you start exposing more then its seeing more + indicating there is movement which would cause "someone" to be more aware of it. In regards to conveying it to a player I would say most straight forward is Barks, so something like: See 1 bone bone the AI might say say "hey was there just movement over there / what's over there" and look in the direction + change their perception from being short range and broud to longer range and narrow. See 2 bones the AI says "hey you over there come out / who's that over there" and change perfection + maybe shoot a warning shot or continue to bark other similar things + maybe investigate. See 2 (one being major bone ) or more bones then full combat AI rules where it finds cover and calls for backup etc etc.
When the bot sees one bone the player might be behind cover but because of how the animations are setup one bone or may be a few bones are exposed.....if in this case the player is detected it would feel unfair to the player because the player was not given a better way to hide.....if your game has systems to give the player control over each and every bone then if the player gets detected it is because he/she did something wrong (ex: he had the option to fold his arm but he did not and got detected) otherwise such systems would only frustrate the player...... remember the bots are not there to behave realistically, they are there for the player's fun....so games always need to be player favouring and never make the player feel cheated..... emphasis on the word feel
Thanks a lot for this! Although it only works if you use the same BaseCharacter for the AI and the Player. I'm forced to have different BaseCharacters for each. Is there a way to make that work? Been trying now for about 6h without success. Thanks a lot in advance for a response!
Well there are no good reasons for having different base characters for the player and the ai but if you must do it then put the "can be seen from" function in the parent class for the player
@@pranjalbhattacharjee5601 Thanks Pranjal! I already tried that. I might give it another go today. Could be a cpp plugin for the PlayerCharacter that acts as a child and is throwing off things. I'll comment if I succeeded. Thanks again.
I am not sure I understand what you are saying but for the "can be seen from" function to work, all he characters need to inherit from the same base class