How To Use Navigation Invokers In Unreal Engine 4 and 5 (Tutorial) How To Use Nav Mesh On Large Maps

Поділитися
Вставка
  • Опубліковано 30 лип 2024
  • Hey guys, in today's video I'm going to be showing you how to set up and use navigation invokers for your nav mesh system in Unreal Engine 4 and Unreal Engine 5. This allows you to use the nav mesh on larger maps that would ordinarily cause the nav mesh bounds to not work or cover the whole map.
    #UE5 #UnrealEngine5 #UE5Tutorial
    ___________________________________________________________________________
    00:00 - Intro
    00:18 - Overview
    01:58 - Project Settings
    03:55 - Navigation Invoker
    05:28 - Common AI Move Bug
    05:54 - Test
    06:59 - Final Overview
    07:24 - Outro
    ___________________________________________________________________________
    If you enjoy make sure to subscribe: / @mattaspland
    Join My Discord Server: / discord
    Follow Me On Twitter: / matt_aspland
    Follow Me On Instagram: / matt_aspland_
    All My Social Media Links: linktr.ee/MattAspland
    ___________________________________________________________________________
    If you want to support me, there are many different ways of doing so. This is by no means expected or required. It is just a nice support :)
    Patreon: / mattaspland
    PayPal: paypal.me/mattaspland?country...
    Ko-Fi: ko-fi.com/mattaspland
    Thank you :)
    ___________________________________________________________________________
    To access the project files and screenshots from the video, check out my Patreon above!
    My Public Video List: trello.com/b/7vJgXzBm
    Unreal Engine 4 Tutorials Playlist: • Unreal Engine 4 Tutorials
    The Basics Of Nodes Playlist: • The Basics Of Nodes In...
    ___________________________________________________________________________
    ♫Outro Song♫
    ●Kronicle - Chill Noons

КОМЕНТАРІ • 61

  • @wolfiedgr8t
    @wolfiedgr8t Рік тому

    Wow, didn’t know about this Matt. Nice one 👍

    • @MattAspland
      @MattAspland  Рік тому +1

      Happy to show off a great new feature to you!

  • @justsam4546
    @justsam4546 Рік тому

    Welp guess no team based ai vs ai , was worth a try
    Awesome vid as always btw thanks

  • @alexkerasidis
    @alexkerasidis Рік тому +1

    Nice. Gongrats on 40 thousand Subscribers!

  • @PatrickTheDM
    @PatrickTheDM Рік тому +2

    Great tool! I just wonder about if you need to link nav meshes. Can you set that up first and then change the settings to invoke?
    The way I handled this in my Skyrim mods was to set up trigger boxes to spawn the enemy NPCs that would be close to the player as they explored. This prevented them from using any processing power/being rendered until they were close enough to be needed/seen. Oh, and you could spawn them behind the player to give the feel that they were followed or missed a hiding NPC as well.

  • @unsolvedbc
    @unsolvedbc Місяць тому

    Perfect for a large open world! thank you!

  • @LimitedPerfection
    @LimitedPerfection 7 місяців тому

    Yep. Works. Lowered overhead on loading SIGNIFICANTLY and resolved an bug where I had to reload the nav mesh when generating new PCG terrain.

  • @the__jive
    @the__jive Рік тому +4

    Nice video!

  • @xlukasz123x8
    @xlukasz123x8 Рік тому +1

    Amazing tutorial. I just ca from lmms (a free daw software) and i decided to switch since it didn’t offer enough convenience. It was

    • @tldmbruno
      @tldmbruno 3 місяці тому

      ?? Did you switch to what? Isn't LMMS a music composing software, like FLStudio?

  • @knightofbrokenglass9237
    @knightofbrokenglass9237 Рік тому +1

    You Are A Life Saver!!!

  • @ZimCrusher
    @ZimCrusher Рік тому +3

    this is super helpful, but what if you are making an infinite runner?
    You can't extend the navmeshvolume forever, correct?
    Can you move the navemsh volume, if you character gets close to the edge?

  • @wesss9353
    @wesss9353 Рік тому

    Good video.

  • @RiverFox_YT
    @RiverFox_YT 5 місяців тому

    fantastic video. i have a question though. i want my ai to be able to move anywhere within my open world, and essentially chase me for a certain time until im out of its range, is it better to set this up on the character or on the ai? there will be random spawns of the ai around the map but they will go into like a sleep state untill i awaken them by going near them

  • @SamuelHale-fk9ij
    @SamuelHale-fk9ij 9 місяців тому

    Hi Matt, thanks for this amazing tutorial. I have been trying to find out if there is an extra cost to in game performance for every invoker that is added? I want my enemy ai to have an invoker, but i can have 15 to 30 enemies at once pursuing or attacking the player. Will this cause a performance hit as there are obviously multiple invokers running at once and overlapping? Or doesn't it matter much? Regards, Samuel. I also have friendly ai supporting the player who also have invokers. My map is huge, so this seems to be the only way i can do ai navigation on my level.

  • @hawkeyes4768
    @hawkeyes4768 Рік тому +9

    currently build a game for fun on unreal (useing all the free assets)at a intermated lv
    and messing around with what u were teaching
    u on a roll
    u taken these complex things and explained and made them easy for anyone to follow
    keep up the great work
    do u have any cheats for AI world creating or Ai characters attacking player

    • @MattAspland
      @MattAspland  Рік тому

      Thanks for the support, that's great to hear!
      This video might help for having an armed AI attack the player: ua-cam.com/video/64seYRqBYNQ/v-deo.html

  • @thefuppits
    @thefuppits Рік тому +2

    If you're doing World Partition, do you cover everything where AI might navigate with a Nav Mesh - like, entire partitions? If the nav is invoked only around the Player, then it should still remain performant, right, with areas not near the Player doing anything really until the Player is near.

  • @HiraethGame
    @HiraethGame 2 місяці тому

    Thanks, nice tutorial. Works perfect on normal level, but how to setup with partitioned world?

  • @Utopia2023Game2
    @Utopia2023Game2 7 місяців тому

    Thanks useFull Video

  • @StarieSki
    @StarieSki Рік тому

    Could you do a dont move / keep calm Tutorial? from games such as until dawn man of Medan and ect. I Can’t find one anywhere

  • @doblajesimberbe1966
    @doblajesimberbe1966 Рік тому

    Nice video! I didn't know about navigation invokers an this is super useful. I have one question though, what can I do if my level is generated on runtime and everytime the player approaches to the edge of the world another chunk is created? What should I do with the navmesh volume?

    • @draicor
      @draicor Рік тому

      I think I read somewhere you need to have a persistent area on your world, one that never despawns, an dplace the navmesh bounds volume there

  • @MartKart8
    @MartKart8 Рік тому +5

    So by following this the characters I built will only roam, when my character is in range, I like that, they all use the random roam code, apart from the chasing spiders and guardians, that use behaviour trees.

  • @cheemayt1530
    @cheemayt1530 Рік тому

    Bro You are Legend. You know that?

  • @imaginaryconception
    @imaginaryconception Рік тому

    how do you make sure the AI never strays too far from the player? That it stays within a specific radius?

  • @Enderking394
    @Enderking394 10 місяців тому

    The nav mesh ignores trees and rocks I placed with the foliage tool even though collision is BlockAll. How do I fix (unreal 5)

  • @mv4458
    @mv4458 Рік тому +1

    Would this affect your Animal AI from the series you made? I mean would those values for roaming around be affected or anything else? Thanks and great content as always :)

    • @MattAspland
      @MattAspland  Рік тому +1

      If you have those values set to a higher radius than your navigation invoker from this video, then they won’t move as they can’t reach their destination.
      To fix this you can either increase the radius of your navigation invoker, or decrease the radius of your animal AI movement.
      Great question!

    • @mv4458
      @mv4458 Рік тому

      @@MattAspland Hey thanks for response! I've been working on this entire day, and yes your are right. Either increase player radius or decrease animal radius.
      None of these work for me. It is a too big of a performance hit. 50frames in editor, 25 in play. All because of a too large NavVolume.
      So I've decided to look into the Spawn System that was free recently, and trying to make it work with Animal AI. It seems to be very cheap and spawns all the animals, but they don't move? I guess it is since they require a navigation.
      I'm just wondering is it possible to keep all the animal behaviour while working with a spawn system? I think this is the answer for anyone having to spawn many AI on a larger world.
      Thanks again! :)

  • @kmtsvetanov
    @kmtsvetanov 2 місяці тому

    Question. Can I have a Navigation for the AI without a landscape? I'm building rooms and use static meshes for floor.
    Thank you!

  • @digimikeh
    @digimikeh Рік тому

    hi!, thanks for this, while using invoker, do you still need to have NavMeshBoundsVolume covering the whole area?

  • @redgeciccone8218
    @redgeciccone8218 2 місяці тому

    For a large world like 4033x4033 a boundery of this large will affect your FPS... I stuggle with that right now and decide to place many boundery small volume every where the player should go.

  • @ZimCrusher
    @ZimCrusher Рік тому +1

    QUESTION: Once the navInvoker is out of range of the AI character, they stop moving, but they do not stop thinking.
    Is there a way to turn them off, when out of bounds?
    Even the characters who I have as a 50/50 chance of moving, or standing still (when they select stand still) start constantly rechecking their move option, once the navInvoker moves away. Using more CPU.

    • @SaltHuman
      @SaltHuman 7 місяців тому

      use a trigger volume to spawn you ai char and then a distance variable which you hook up to both you trigger volume and your invoker , that way you can unload the ai char when you're far from it.

  • @engebionordeste6587
    @engebionordeste6587 Рік тому

    You could make a basic template to start with every ti you start a new .

  • @tastysnak
    @tastysnak Рік тому

    I notice in the thumbnail the navigation area is a circle, but in the video its a square. Is there a way to change the shape of the area in Unreal? Having an equidistant nav area in all directions would be good to achieve.

    • @MattAspland
      @MattAspland  Рік тому +1

      As far as I'm aware there is no way to change the shape of this no, at least in blueprints anyway. There may be in C++, but I haven't looked into it. The squares will try and stay as equidistant as possible, but even with a circle it will be slightly off due to it updating and spawning/removing them.
      The circle in the thumbnail was just for ease of showcasing the idea visually.

  • @ChengliangPan
    @ChengliangPan 5 місяців тому

    I found a problem the NavMeshBoundVolume will disappear when Character move too far, it's said about WorldPartioning, but I cannot solve this problem, please help

  • @TorQueMoD
    @TorQueMoD Рік тому

    Is updating the navigation volume in real-time actually more efficient though? Sure, disabling the AI is more efficient, but I'm not sure that the nav mesh is actually taking up any kind of resources. It's something that's baked when you build the level isn't it?

    • @TorQueMoD
      @TorQueMoD 11 місяців тому

      @@Sammyhale30I thought the navmesh was baked though the same as lighting. So shouldn't it just be calculated once and culled from the renderer the same as any other geometry?

  • @DeftlyJ
    @DeftlyJ Рік тому

    If there is no Nav mesh, wouldn't the AI keep trying to move and fail? Wouldn't that cause issues?

  • @unrealdevop
    @unrealdevop Рік тому

    Oddly enough this isn't working for me, maybe it's a bug? Idk but it appears to work in the editor I can see it updating as I move the player around but when I play the character won't move and the invoker doesn't seem to be working. If I eject and press P to show the navigation mesh nothing is visible.

    • @unrealdevop
      @unrealdevop Рік тому

      I solved it...I had enabled a World Partition setting and had forgotten about it.

  • @carlosrivadulla8903
    @carlosrivadulla8903 Рік тому

    how is this in terms of performance?. I mean, by not generating the navmesh on the entire map permanently it should save some performance but on the other side a real time generation may be worse

    • @ThirstyThursten
      @ThirstyThursten 11 місяців тому

      Fo me Dynamic is definitely worse.. Insane amount of FrameSkips and Drops.. I'm looking at setting up the invokers on static areas right now..

  • @MarioMurkl
    @MarioMurkl Рік тому

    You just same my whole project, thy mate!

  • @sarahlynn7807
    @sarahlynn7807 11 місяців тому

    When I do this my fps drops to nothing with no ai in the world even. Any ideas?

  • @Jr-Mind
    @Jr-Mind Рік тому +1

    Can you make a Splatoon shooting tutorial

  • @AresWorlds
    @AresWorlds Рік тому

    it wont work on 2d flipbook characters

  • @boombyte8849
    @boombyte8849 Місяць тому

    Actually UE nav system is far far away from food level.

  • @magegames6202
    @magegames6202 15 днів тому

    can you add to player and AI so they can roam around a little but if you get close and they end up in your invoker they will chase instead of roaming and then go back to roam if player gets far enough?

  • @intelligence-8007
    @intelligence-8007 Рік тому