New Navigation in Godot 3.5: Avoiding Obstacles

Поділитися
Вставка
  • Опубліковано 13 чер 2024
  • Learn to Code from Zero, With Godot: gdquest.mavenseed.com/courses...
    Godot Node Essentials (ultimate cookbook): gdquest.mavenseed.com/courses...
    ---
    📚 THE LINKS
    Godot 3.5 open-source demos: gdquest.github.io/godot-demos...
    ---
    👥 CREDITS
    Video edited by Nesi: / nesiawesomeness
    ---
    💌 JOIN US
    Come chat on Discord: / discord
    Follow us on Twitter: / nathangdquest
    ---
    📝 CC-BY LICENSE
    This video is licensed under the CC-By 4.0 license: creativecommons.org/licenses/...
    You can attribute it to "CC-By 4.0 - GDQuest and contributors - www.gdquest.com/"

КОМЕНТАРІ • 30

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

    Amazing, thank you for the constant great content you create!

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

    great demo

  • @Chaff_Games
    @Chaff_Games Рік тому +6

    The new navigation system in Godot 3.5 is amazing. Very easy to set up and performs pretty well out of the box.

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

    This looks epic

  • @the_erebrus
    @the_erebrus Рік тому +6

    What about if I want to avoid collisions with some of the other agents? For example, in an RTS I have multiple friendly units using pathfinding and I don't want them to collide with each other when they move. I'm guessing adding both agent and obstacle nodes to an object isn't going to work, right?

    • @TheYagich
      @TheYagich Рік тому +6

      agents are counted as obstacles if you have avoidance enabled on them!

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

    exactly what I needed, thank you!

  • @user-is9fu2js1l
    @user-is9fu2js1l 3 місяці тому +1

    I am on godot 4 and navigationobstacle2d's properties has changed and its not working for me please help.

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

    Does this work for 3D ? every AI tutorial i find around about 3D is either only usable for single player mode only or is incredibly lag inducing when there are multiple AI agents.

  • @alextkd2003
    @alextkd2003 8 місяців тому +2

    Please update for godot 4.1 🙏🙏🙏

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

    Hi, I downloaded the project and did some testing; the enemy doesn't seem to actually path around the obstacle. It just collides and slides off of it. Is there a way to make it actually path around it?

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

      Yeah, I came to the same conclusion. If you take out all that physic and smoothing stuff and simply add the velocity from to the callback to the position, you see that the path finding completely ignores the obstacles.

  • @zZMazeZz
    @zZMazeZz 10 місяців тому +1

    Please update this for Godot 4, there is no examples of using these in godot 4 that I can find.

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

    I've just come back from a break from Godot and this really helps thx

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

    Is there any way to make turning slower? I mean, not make sharp turns but slowly avoid obstacles as if they were thicker and round for example.

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

      Yes, you can play with several parameters:
      - Increase the radius of obstacles. If you want to keep a collision shape that fits the obstacle, then turn off the detect radius option on the obstacle node and set the radius manually. You may need to lower the agents' radius, so they don't struggle to fix between an obstacle and the navigation polygon's limits.
      - Increase the obstacle detection distance and the distance you can stray from the path on the agent. It'll try to avoid obstacles a little earlier (Path Max Distance).
      - If you use your own steering code for the agent's movement, I would recommend playing with the drag factor. Lowering it will make the agent accelerate slower but also turn slower and move in smoother and wider curves.

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

    Does this also work in 3D ?

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

      The system works in 3D and the setup and code are similar, yes. In the provided open source demos, you'll find the 3D equivalents to this 2D project.

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

      @@Gdquest Thank you

  • @Trendsthismonth
    @Trendsthismonth 25 днів тому

    Your Github page is down.

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

    Boosting for the algorithm

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

    Too bad generating navigation polygons in 2D is very clunky, you have to either do it manually through the editor, or "manually" do it through code.
    I'm surprised there's no simple one-button mesh baking like there is for the 3D mode, and I don't think there is a good reason for it

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

      agree. its so time consume to do nav mesh in tiles.

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

      @@tPlayerioT fyi, there is a 2d nav mesh baking in latest Godot 4.2 beta 1.
      It should work with tiles too, haven't tried it myself

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

    Donde puedo conseguir los archivos del proyecto ???

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

    +

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

    navigation 2d is deprecated, this doesn't work anymore

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

    I did that in my project but my AI kept getting stuck on the objects while its chasing player that is on other side of the object it wants to avoid.. I expected more from this feature I even spent whole week trying to get it running... big disappointment for me. I ended up having to make AI going through objects which sucks but yeah well this engine can't deal with that reliably.
    Also there is no way to make AI avoid static obstacles that are created at runtime which is something that engine should be able to handle.. you have to draw empty spaces inside NavigationPolygon to where static objects are which is disaster as every time I add new object I have to complete re-do whole NavigationPolygon - which also makes it impossible to do randomly generated maps. I love godot but making games with AI is nightmare.

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

    Is it possible to make maincraft game through godot engine?
    please ans me