Тёмный

Unreal Engine 4 Tutorial - AI EQS Part 2 - Hiding from the Player 

Ryan Laley
Подписаться 104 тыс.
Просмотров 44 тыс.
50% 1

In the continuation of our AI EQS series we go further into creating a EQS Query that this time will allow our AI to run and hide from the player.
Support me on Patreon and get access to videos early, join our developer community on Discord, get exclusive behind the scenes videos on my projects and much more over at / ryanlaley .
Subscribe now to catch each video as they are released each week.
Follow me on Twitter: / ryanlaley
Like my page on Facebook: / ryanlaleygames

Игры

Опубликовано:

 

12 июн 2019

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 54   
@InspectorGeek
@InspectorGeek 5 лет назад
Thanks a Lot Ryan, your tutorials just came in the best time possible for myself! Keep up the good work!
@imakegamesgains4
@imakegamesgains4 4 года назад
Please keep these videos going, I've binged all the AI videos in a single day, I love it! Thanks a bunch!
@RyanLaley
@RyanLaley 4 года назад
In the new year for Patrons, a new AI series will be released. I like to alternate series with ai based ones. So look out for more AI stuff in the near future on my Patreon and a little further on on RU-vid.
@thomasjensen5042
@thomasjensen5042 5 лет назад
Thank you so much for this excellent series! I learned so much and can't wait for more videos regarding AI! Subscribed!
@CargoChuck
@CargoChuck 5 лет назад
Perfectly timed. I can't wait until the next one. I need to figure out how to have the AI run from the light....
@yaris684
@yaris684 3 года назад
This is the best EQS tutorial out there, please more of this sir!
@MarkOfArgyll
@MarkOfArgyll 5 лет назад
Thanks Ryan, these are really helping me understand the world of AI behaviour nicely. :)
@ChaojianZhang
@ChaojianZhang 3 года назад
The presentation can use a bit of improvement but the information is invaluable.
@svenrawandreloaded
@svenrawandreloaded 3 года назад
when the world needed him most he vanished
@teemochun4432
@teemochun4432 4 года назад
I can't wait to watch the next video, cover and shoot.
@BaseRealityVR
@BaseRealityVR 3 года назад
Fantastic video Ryan :) Been messing about with a lot of AI lately and have yet to actually EQS yet, But I can already see how much more powerful it is and How it actually makes AI a bit easier. Going to now use this On a mini game I just started.
@geoffrey3668
@geoffrey3668 5 лет назад
Amazing tutorial! Thanks!
@PapitaMC
@PapitaMC Год назад
Excelentes videos, ojlala puedas continuar haciendo videos!!! eres un maestro!!!
@harleyracer2005
@harleyracer2005 4 года назад
I'm glad you made this the live streams on the unreal page isnt quite as clear
@OPirataVham
@OPirataVham 5 лет назад
Cool work.
@aikidoca
@aikidoca 4 года назад
wow really cool tutorials, loved that one, now i would love to see in future a AI tutorial on how to make a AI to have a sort of "village npc" AI, i means a sort of behaviour where the if the npc is hunger he goes to a pick a "food(a simple small test cube) to eat then if him tired he goes to another to "sleep" or if he want to talk he goes to the player to "talk" and things like games like the sims or some npcs in games like assassins creed or skyrim, making a npc having different reactions based on what is happening around him, if him is being attacked he can choose between run and hidden or fight back. Another thing which i would love to see is how to give "traits" to a AI, making the npc taking decisions based on that traits. I really love AI that is my most important part of the game and i'm working a project which would need that more complext type of AIs and would be cool to have some tutorial over it, because most of the tutorials are aways about "combat" ais and is hard to see one about "non combat" or civillians AIs,
@Paul-hw7kc
@Paul-hw7kc 4 года назад
I totally would love to see this! This is the core of a survival game I'm working on.
@KerryCronic
@KerryCronic 5 лет назад
Super awesome! Very close to what im looking for. Ive been trying to find a way for NPC to run away after being punched, or after gun fire.
@user-sv4nq8vq1s
@user-sv4nq8vq1s 3 года назад
Cool. Including a pathfinding test would be good
@aliemrecetinkaya2119
@aliemrecetinkaya2119 5 лет назад
Great Tut thanks
@vDungeon
@vDungeon Год назад
Amazing explanations! Thank you, Sir! A question - I guess the order of tests in a query does matter. I think that ideally we have to filter out locations using cheap tests and only then we have to perform consuming queries, right? Maybe it worth it to explain that and give some estimates on complexity?
@BitchesLoveGoodra
@BitchesLoveGoodra 4 года назад
I don't know if EQS is right for this but, I'm very interested in learning how to make a more advanced AI pathfinder then just 'move from A to B in the shortest path possible'. Like AI that only approaches the player from behind while purposely trying to remain unseen (For horror or action games), or AI that tries to flank to the sides of the player (For shooter games), or AI that constantly tries to avoid being in the players view when it heads to a hiding spot, or AI that will slightly change its path when heading towards a player if the player looks at it (Like an animal would or a soldier would to avoid being shot). There are so many useful ways AI should pathfind to or from something without resorting to the unrealistic quickest path. AI that flees, flanks, stalks or ambushes in any genre cannot function believably without it. I remember reading an article on how Killzone's AI used weighted pathfinding when approaching the player and this EQS system reminded me of it.
@Paul-hw7kc
@Paul-hw7kc 4 года назад
Sounds interesting. These are elements I'd like to later add to my game. I'm curious what all you've come up with to simulate these behaviors.
@georgearida4144
@georgearida4144 4 года назад
you are amazing for teaching , i have one request please can you make enemy starfing movement , like when you fight a boss like darksoul the enemy move move fwd,bwd,left, right? please
@faisalchowdhury1688
@faisalchowdhury1688 4 года назад
Hello ryan i had this unrelated question. I packaged a game app recently for android on ASTC and ETC1. For some reason the audio isnt playing once the game is packaged. The wav file seems to be fine can you guess the reason why it might be doing that?
@GeneralNovais
@GeneralNovais 9 месяцев назад
great tutorial. I have a problem, can you guide me? When I place it in a BIGGER space where there is nowhere to hide, the BT keeps looping in the Run EQS trying to locate a place to hide and the AI crashes. How can I solve this problem?
@DarkEnforcer11
@DarkEnforcer11 5 лет назад
Hey Ryan, love the AI series, I have a question, so I have my player with stealth camouflage, how do I make it so my AI can’t see the player when the stealth camo is active?, I’m new to Unreal Engine and anything I’ve learned is from you and some other RU-vidrs, I can’t seem to find a tutorial to help with my question tho.
@CyberNomadic11
@CyberNomadic11 5 лет назад
In your Character BP (or code) create a condition that is true/false depending on the state of the camouflage ability - set the condition when the character activates/deactivates camouflage. Then in the behavior tree, create a task that casts into your character file and grabs the state of the camouflage condition and stores it to a blackboard key that can later be used when determining if the character is using camouflage. Some of the earlier videos in this series cover flow control.
@MegaAgiri
@MegaAgiri 3 года назад
I have melee animation, I want that tree runs it after eqs/move to/play the melee/ but it never reads it, it just goes to loop between run eqs and move to, I have also setted isplayerinmeleerange. it runs smoothly without eqs. Can u give me an advice what to do or maybe a tutorial or a course. I would be in your debt.
@svenrawandreloaded
@svenrawandreloaded 4 года назад
is there an easy way to copy this ai? i tried duplicating the folder to create a different npc but i get an accessed none error to do with the change npc speed object
@svenrawandreloaded
@svenrawandreloaded 4 года назад
this series cas been incredibly helpful, will there be a part 3 or is this it?
@RyanLaley
@RyanLaley 4 года назад
So this was an intro. I know do so series that show how to use this system in particular contexts. For example the shooter ai series. More AI series are on their way
@svenrawandreloaded
@svenrawandreloaded 4 года назад
@@RyanLaley nice thats perfect, i need me some bullets.
@jackmoonx522
@jackmoonx522 5 лет назад
Hi Ryan, can you please make a Hiding Tutorial? like player can hide under table or bed or something? im sure there's people here that needs this tutorial too. thanks in advance.
@danpaul4108
@danpaul4108 4 года назад
EQS seems awesome, but how close is it to being non-experimental? I don't see it on the road map. Some EQS questions on the forums seem to have gone unanswered.
@RyanLaley
@RyanLaley 4 года назад
No idea. Probably not until UE5 now. But, it's mostly listed as experimental because it has no documentation and the UI is still too confusing.
@EmilyOen
@EmilyOen 4 года назад
Which UE4 version do you use in this AI serie/Tutorial ? Thanks :)
@baronvonbeandip
@baronvonbeandip Год назад
Pretty sure it was 4.26
@rsfan24
@rsfan24 2 года назад
That final trace breaks the AI for me, because when it reaches the point that it can't see, it enters a paradox of "Oh, I can see this place now, so it's no longer the best place to hide", and it makes the AI start running for a different hiding place immediately after reaching the favored point.
@PerFeldvoss
@PerFeldvoss 4 года назад
Thanks a lot - seen the tutorial several times, and I got a working BT/EQS setup working for hunter/neutral/pray characters, with a action and attention status. However there is one annoying thing going on.... When the AI try to hide the EQS will often return the best spot to be on a path that goes directly towards/accros the player! The AI will thus run closely past the player - and that is not exactly "clever"... is there a simple way of "blocking" the path even though it is there? I actually found one way of doing this - I added a cylinder to my Player mesh(!), made it invisible, but also added some Environment collision 'object channel' to the 'Character pary' and to the Cylinder. This seems to work on... but it will also prevent the Player from going near the Pray... thus I will need an event that will disable the block, but only when the Player interacts with the pray.... however I may want to set the 'object channel' on the Pary and then destroy/disabel it when upon interaction. Wonder if there is a better way of doing this?
@simenandrehadi2557
@simenandrehadi2557 4 года назад
I'm working on the same thing. We need a test to make sure that the AI doesn't pick any points behind itself or the player so that it doesn't run towards the player. I'll let you know if I find a solution.
@PerFeldvoss
@PerFeldvoss 4 года назад
@@simenandrehadi2557 I think I found a solution, it is however a bit hard to test. The idea is that you can adjust the navmesh using custom collision. This is the principle: * Create two special 'object channels', "pray" and "hunter", via the project settings, under collision! * Add a special mesh - say a box or a cylinder - to the player character. * Make the box invisible in the game - you can have it as "text transparent" material in the editor. * Set the collision of that box to collision block 'objects type' pray, where it self is 'object type' hunter. * Finally make the CapsuleComponent of the AI (and your AI Pawn, or make a special AI-Pray-pawn) a "pray" type... Ones you get it right, you can see that the navmesh is generated so the AI can not go near a player. Then it is just a question of getting the right size/shape of the invisible mesh right. There may be ways of making a special mesh with debug options... I think i need to explain this a bit more and make a post in the UE4 forums. But check the net for ways to use 'object channel' and the navmesh... or perhaps there is an even better way?
@simenandrehadi2557
@simenandrehadi2557 4 года назад
@@PerFeldvoss I solved it aswell with the help of SparkyMcSparks, here's his quote: "Dot test, Line A from the player to your Querier (the deer), and Line B from the Querier to the Item A second dot with Line A being rotation of Querier, and Line B from Querier to Item. Set a clamp min to something tight like 0.7 and the scoring factor to 0.5"
@PerFeldvoss
@PerFeldvoss 4 года назад
@@simenandrehadi2557 Thanks - that works MUCH better (setting the score-only)! I did/do not know enough about the DOT test, and I also need to readup on EnvQueryContext... the EnvQueryContext_Item is what makes this operation work! (so I need to throw out what I made, or use it for an other purpose..!)
@yaris684
@yaris684 3 года назад
I am seeing the "running into player dangerously close" issue as well.
@aquagamerstr1192
@aquagamerstr1192 5 лет назад
Can you make the AI can't see player if he is in shadows?
@harisnauman4005
@harisnauman4005 5 лет назад
Hi, You Can possible Do this in many ways but from what i understand and the path i will take is as follows. Make A bool/Float(if you want slightly or fully visible part) inside the player Actor and use volumes On Light Entities, if the player enters the volume the Light Should Line Trace towards the Player(To see if the player is behind any object or not) and get the distance between the Player and Light Source, Depending on that distance you can toggle the Bool(IsVisible) ON or OFF. After That when you make Behavior Trees you can then tell the AI to Cast to the player and Check if Player's IsVisible True Or False, if True you can do the pervious tutorials about AI which Explains AI chasing and Attacking player. Hope That helps, I dont have much experince with UE4 but i have been modding and using other engines for a while So take me method as a prototype, Not sure what will be the performance impact or if it is Network friendly or not.
@themadscientist8271
@themadscientist8271 4 года назад
any chance this will be continued?
@RyanLaley
@RyanLaley 4 года назад
It was kind of broken into different sub series to tackle specific uses. For example the shooter so series. Currently patrons are getting the melee AI series and will then get a flying and a pet based series.
@overlandgames
@overlandgames Год назад
is there a part 3 to this that I'm just not smart enough to find?
@henrijs1733
@henrijs1733 Год назад
looks like he got bored
@lordGoldemort
@lordGoldemort 3 года назад
This was one of your poorer videos, Ryan. Overloaded the tests bit, should have taken more time to show the difference the various tests made on the behaviour. And cut out the bit where you ummed and erred and read the docs.
@baronvonbeandip
@baronvonbeandip Год назад
Nah, it was just fine. It's obvious what the tests do by their effect on the weighting. Far better than, say, CodeLikeMe's tutorial on the same topic.
@philippec7213
@philippec7213 Год назад
Hello, BUG FIXING when you will finish "EQPS part 1 & 2" tutorial. The patrolling will not work. The chase will start without patrolling because the function "complete sense" will be activated by "EqsTestDummy" (added for the "shy" character ) and the "CanSeePlayer" will be set to true despite the player character is not visible by any AI. To avoid that, and, in order that the both AI can be used in the game at the same time : a test on the player shall be added in the AI controller , by this way the "shy" character and the "chase" character can be used in the same time and work properly. drive.google.com/file/d/1B_ixuVaHFdX64wn-qP7geQM9-CXzG3eY/view?usp=share_link
Далее
Unreal Engine 4 Tutorial - AI - Part 4 Patrolling NPC
20:50
I Made a Game about Shrek, it will DESTROY your PC
19:19
Demystifying Soft Object References | Inside Unreal
1:27:51
Unreal Engine 4 Tutorial - Splines - Cave Splines Pt.1
26:54
Why Unreal Engine 5.4 is a Game Changer
12:46
Просмотров 1,1 млн
Why I’m switching from Unity to Unreal Engine
9:02
21 Бесполезный Аспект [Dota 2]
41:45
Просмотров 170 тыс.