Тёмный

New Navigation in Godot 3.5: Avoiding Obstacles 

GDQuest
Подписаться 267 тыс.
Просмотров 22 тыс.
50% 1

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

 

1 окт 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 32   
@the_erebrus
@the_erebrus 2 года назад
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 2 года назад
agents are counted as obstacles if you have avoidance enabled on them!
@TaksharyaSinghJasrotia
@TaksharyaSinghJasrotia 7 месяцев назад
I am on godot 4 and navigationobstacle2d's properties has changed and its not working for me please help.
@alextkd2003
@alextkd2003 Год назад
Please update for godot 4.1 🙏🙏🙏
@Chaff_Games
@Chaff_Games 2 года назад
The new navigation system in Godot 3.5 is amazing. Very easy to set up and performs pretty well out of the box.
@Trendsthismonth
@Trendsthismonth 4 месяца назад
Your Github page is down.
@zZMazeZz
@zZMazeZz Год назад
Please update this for Godot 4, there is no examples of using these in godot 4 that I can find.
@realMenta
@realMenta 2 года назад
Amazing, thank you for the constant great content you create!
@leonid2202x
@leonid2202x 2 года назад
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 11 месяцев назад
agree. its so time consume to do nav mesh in tiles.
@leonid2202x
@leonid2202x 11 месяцев назад
@@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
@sartouhou8349
@sartouhou8349 Год назад
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 Год назад
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.
@sergeantsapient
@sergeantsapient 3 месяца назад
@@NerdUndStolzDarauf From my understanding, NavigationObstacle doesn't do anything to change the agent pathfinding, it just modifies the velocity of the agent.
@李君陌
@李君陌 2 месяца назад
@@sergeantsapient Velocity is a vector that changes the direction and speed of the agent. What's strange to me is that the obstacle avoidance between agents is indeed effective. Before multiple agents collide, the velocity of the agent can be changed to achieve obstacle avoidance (this is actually the RVO algorithm. One disadvantage of it is that if the avoiding agent is pushed to a place without a navigation network, it will no longer be able to find the path normally). But what puzzles me is that the velocity does not change when the agent encounters an obstacle. I tried for a whole afternoon but couldn't find the answer. If anyone finds out what's going on, please let me know. Thank you!
@ZooHair
@ZooHair 2 года назад
This looks epic
@Ceisriel
@Ceisriel Год назад
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.
@TheNathy1000
@TheNathy1000 Год назад
navigation 2d is deprecated, this doesn't work anymore
@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 2 года назад
Does this also work in 3D ?
@Gdquest
@Gdquest 2 года назад
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 2 года назад
@@Gdquest Thank you
@SULTANVIDEOGAMES
@SULTANVIDEOGAMES 2 года назад
+
@ukrsolid
@ukrsolid 2 года назад
great demo
@roastinpeace2320
@roastinpeace2320 Год назад
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.
@EisenFlammeberge
@EisenFlammeberge 2 года назад
Boosting for the algorithm
@NitroxNova
@NitroxNova 2 года назад
exactly what I needed, thank you!
@thef1rst1
@thef1rst1 2 года назад
I've just come back from a break from Godot and this really helps thx
@TheJmgoya
@TheJmgoya 10 месяцев назад
Donde puedo conseguir los archivos del proyecto ???
@AyanGames9629
@AyanGames9629 2 года назад
Is it possible to make maincraft game through godot engine? please ans me
@tPlayerioT
@tPlayerioT 11 месяцев назад
1 year later
Далее
Godot 4 Navigation Agents (ReUpload - Audio Balance)
10:25
How To Shader (Fast) - using Godot Engine
7:10
Просмотров 333 тыс.
How Games Make VFX (Demonstrated in Godot 4)
5:46
Просмотров 347 тыс.
BETTER 2D visuals in 7 EASY TIPS
10:38
Просмотров 70 тыс.
How You Can Easily Make Your Code Simpler in Godot 4
6:59
Finite State Machines in Godot 4 in Under 10 Minutes
7:16