Unreal Engine AI Tutorial #3 - Mob AI Part Two

  Рет қаралды 2,907

zoombapup

zoombapup

Күн бұрын

Пікірлер
@daeftan
@daeftan 10 жыл бұрын
Thanks very much for these, Zoom. I really enjoy your series and find it really useful. These are a real contribution to the community.
@zoombapup
@zoombapup 10 жыл бұрын
Thanks Jason, I enjoy doing them too. More to come very soon.
@hsingh0111
@hsingh0111 10 жыл бұрын
Hi there, thanks for these awesome tutorials! I have a question:) There is a small delay with my character when it moves to the next target point. I guess this is because when the characters reaches it's first target it stops and rotates. Is there a way to fix this?
@zoombapup
@zoombapup 10 жыл бұрын
Harminder, I can't actually respond to you directly. But in that case, you can try tweaking the radius of the waypoints to see if they set the next waypoint early enough before the agent gets to the point and stops. Otherwise, you could maybe have a flag on the waypoint that it passes to the AI to tell it "don't stop at this point, but keep going" as a bool and use that as a condition on the turning node of the movement (so it doesn't turn when it reaches the point).
@hsingh0111
@hsingh0111 10 жыл бұрын
@zoombapup thanks for the reply. Tweaking the radius did not work. How can I set the turning node?
@zoombapup
@zoombapup 10 жыл бұрын
Harminder Singh Its a task in the BT itself.
@BlueEagle669
@BlueEagle669 10 жыл бұрын
Hello there! I'm following your tutorials quite closely and they are great to understand and very efficient! I was wondering if this weighted random selection could be applied to some kind of aggro system for a multiplayer game. If so, could you please explain how to implement this? I'm not sure about how this check would look like for an enemy to determine which enemy to go after (must have spotted the enemy before etc). That would be highly appreciated!
@zoombapup
@zoombapup 10 жыл бұрын
You probably wouldn't use weighted random for that, so much as a Utility based scoring system. But that sounds like something fun to do, so I'll do that in the next video! We'll add an "aggro list" of sorts and then score which one to hit and take the highest score as the one to attack (I'm assuming thats what you want for an MMO type setting). Should get that online this weekend if I get time to record it.
@JeremyRobertOrtiz
@JeremyRobertOrtiz 10 жыл бұрын
I'm having an issue I'm hung up on making the RanomWaypoint blueprint, I Can Not find the Variable "WeightedActor" I'm using UE4.6 and I simply can not get that to pop up, any help would be great. Also the section in Waypoint blurprint with the interface message"SetNextWaypoint" just doesn't work to change the waypoint for the guard, despite the fact that variable "NextWayPoint" does change as the DebugArrow correctly points to the next waypoint, the guard does not move to the next waypoint, additionally the interface "EventSetNextWaypoint" in the AIGuardCharacter graph does Not fire off at all. I sort of got around this by copying everything that should be after "EventSetNextWaypoint" in the AIGuardCharacter, and moved it into the Waypoint actor graph using a "CastToAIGuard" to set the blackboard, and hooking up the 'NextWaypoint' variable where the 'GuardTarget' once was, this causes the AIGuard to follow the waypoints but I worry it will muckup whatever is created moving forward as its not correctly using the interface event. I'm not sure if my explanation is clear enough to highlight my issues, but with any luck you might understand and be willing to help. Thankyou very much for these Videos they are very helpful and I feel I have learned a great deal.
@zoombapup
@zoombapup 10 жыл бұрын
The reason we use interface events is that we might want to have generic things following waypoints. What you did with the cast is effectively say "only guards can do this", so what you did is safe to do, but a little bit restrictive is all. I'm guessing that you forgot to add the interface for the setnextwaypoint interface to the guard character blueprint. If you go to the guards blueprint and select "blueprint properties" at the top. You should see some properties. Down the bottom part of that section there should be an "interfaces" array. Is the setnextwaypoint (its not called that, but the interface that has that method described) in that array? If not, it won't be able to get the setnextwaypoint event. So add the interface and try it with the old arrangement. Let me know how it goes. If you're still having issues, easiest way is to make a quick video showing your setup and I'll see if I can spot something. Good luck!
@JeremyRobertOrtiz
@JeremyRobertOrtiz 10 жыл бұрын
zoombapup Thanks for the reply. Ok first off I didn't realise that "WeightedActor" was the name of the Structure that was created, mine had a different name, thats why I couldn't find "WeightedActor" I ignorantly thought it was a Variable type, mystery solved on that bit. So the interface was/is present in the AIGuardCharacter, and the interface has a function 'SetNextWaypoint' which has 2 variables in it. I added the "SetNextWaypoint"message back into the waypoint blueprint, as you suggested, double checked everything, sadly it still was Not working.. So I deleted all the waypoints in the map, repopulated the map and it worked. No idea why this worked, but I did have a similar issue when I made the EnemyCharacter where nothing updated on the map until I dropped a 'fresh' copy into the map. I'm back on track now, I hope my ignorance and pitfalls help someone else avoid a problem. Thanks again for an Excellent tutorial series!
@ChimeraProd
@ChimeraProd 10 жыл бұрын
Is it possible to use this way point method to have the AI follow you around objects dynamically without a navigation grid? The way I believe it is done in DayZ is cheaper for performance and seems pretty smart, Basically in 1 of the dev videos of standalone I saw the player would drop waypoints behind him as hes moving and the zombies would use these to navigate around obstacles, after the AI gets to the first waypoint and onto the next the previous ones are deleted, and having enough waypoints spawn behind the player (from his last location) every half of a sec or so the AI can navigate around without needing a navigation grid. Or would this still require placing alot of waypoints so the AI are not running into walls when chasing from a long distance? Is this the way unreal tournament does it? I havent fired up the new 1 in engine to check how their AI are behind the scenes, I'm just worried because my game has such a huge open world it seems hard to build such massive nav's. Do you think you could make a tutorial for this and wouldnt this method be alot better than using nav's for a large scale open world game? Or could tons of waypoints still get tedious & expensive? Thanks so much for all your work on these videos after each 1 I just crave more
@zoombapup
@zoombapup 10 жыл бұрын
ChimeraProd: The Unreal AI doesn't need these waypoints for pathfinding at all. It uses a navigation mesh for all that. These waypoints are simply an indicator for a patrol route. You can give the AI any actor at all in the guard target value (exposed on the character) and it will go there and act as a guard. I use these waypoints really just to provide a simple way of making the guard patrol a bit. Ideally it would also handle having a few idle/wait moments (which we will get to eventually). The DayZ method is probably because they don't have a navmesh and for zombies its a reasonable thing (its usually called breadcrumbing in AI terms). But not needed in UE4.
@ChimeraProd
@ChimeraProd 10 жыл бұрын
zoombapup Thanks very much for the explanation, really appreciate it! What about for large scale outdoor worlds though? Say if I'm pushing the new world_max of 20km x 20km and want to have my whole terrain with everything in it have a navigation mesh, would that take forever to build? I really love how in dayz the AI can spot you from such long distances and run from very far, unlike the small claustrophobic closed quarters of unreal tournament, Or would the way to do it be to build smaller nav's at a time over the large landscape and link them somehow along with streaming?
@zoombapup
@zoombapup 10 жыл бұрын
ChimeraProd Yeah, the current system has issues with large scale terrain navigation. The problem is actually kind of universal to 3D engines not built for large scale worlds, in that floating point errors can make things like physics stop working when they are far away from the worlds origin. Technically the navmesh approach is WAY better for handing large world because you can treat a huge amount of terrain as a few large polygons. In practice it gets more complex because you need to cut those polygons up for streaming (the same way you need to stream the terrains). Which means you have issues with working sets (i.e. if players are on different parts of a large world, you might need the whole world in memory). But the navmesh should be a decent approach for that once support for proper world streaming comes online.
@ChimeraProd
@ChimeraProd 10 жыл бұрын
zoombapup Couldnt the nav pieces and AI just be loaded by the client in a multiplayer scenario, players who are far away dont even need to care about them, AI can be spawned as a player gets close right? I dont know much about replication but at least the visual mesh's could be hidden by clients until they get within a certain proximity no? And yeah the precision issues have me a bit concerned with pushing these new limits, Epic increased the world_max from 5km to 20km in 4.6, though they didnt say how much testing they did for precision at the extremities, I'm not sure if they would just do this and not test it though.. Do you think it will be playable with a world that large with multiplayer? It seems like alot of space, I really hope so, even though I know arma 2's chernarus is 200kmx200km
@zoombapup
@zoombapup 10 жыл бұрын
ChimeraProd You could certainly do some level of detail that would stream in the meshes and even the AI. But the worst case scenario where each player sits in a different part of the world, but just close enough to care about another player would potentially mean a large part of the world in memory. I'm pretty sure that Mikko (the guy who wrote Recast which is what Epic are using for navmesh generation) told me once that 8k was a pretty good max size for precision issues (he worked on the CryEngine AI stuff), my own tests with my previous engine showed some pretty nasty errors would happen with physics pretty quickly, although that might have changed now. Best bet is to just try it! ;)
Unreal Engine AI Tutorial #3 - Mob AI Part Three
40:15
zoombapup
Рет қаралды 2,3 М.
IL'HAN - Qalqam | Official Music Video
03:17
Ilhan Ihsanov
Рет қаралды 700 М.
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН
Tuna 🍣 ​⁠@patrickzeinali ​⁠@ChefRush
00:48
albert_cancook
Рет қаралды 148 МЛН
Quando eu quero Sushi (sem desperdiçar) 🍣
00:26
Los Wagners
Рет қаралды 15 МЛН
БУКВАЛЬНО НЕПРОХОДИМЫЕ ИГРЫ / Булджать
20:02
БУЛДЖАТь
Рет қаралды 2,5 МЛН
Сборник Эксклюзивов 2024 - Уральские Пельмени
1:33:24
Уральские Пельмени
Рет қаралды 1,3 МЛН
Unreal Engine 5.5 Green Screen Tricks (Blender to Unreal)
11:42
Andrew DiLeo
Рет қаралды 8 М.
Can I 100% Superliminal and Get a Refund?
23:36
Gronf
Рет қаралды 301 М.
Unreal Engine PCG Graph Audio Visualisation Tutorial
18:33
IL'HAN - Qalqam | Official Music Video
03:17
Ilhan Ihsanov
Рет қаралды 700 М.