0 votes

Hello all,

unfortunately I have to ask again, because the topic is very complex and the right question influences the quality of the answers even more.

I had asked before, how to realize a 3D pathfinding with flying objects in a 3D space. A good answer was to use the built-in pathfinding. This works quite well, but more or less only 2.5 D, not really 3D. The problem for me is always the Y-axis (up/down) to a target point. The functionality built into godot via Navigation->NavigationMeshInstance->MeshInstance works quite well if smaller height differences starting from the ground have to be overcome. In a 3D scenario without any ramps or structures over which a baked map is placed, this does not work.

Another issue is, you can't seem to draw the path spline smoother.
In some situations it looks unnatural, for example when a bird flies from point A to point B and has to fly around another object. If it flies linearly to 5 points to reach its destination, it looks at least strange.

I found an example for Unity and I am interested if this can be implemented in godot at all?
In the example you can see exactly what I mean.

Thanks for reading and a good start to the new week to all.

Godot version 3.3.2
in Engine by (85 points)
retagged by

Can you form a concrete question?

Thanks for reading first.

Specifically, the question posed above is whether pathfinding (or raycasting) can be implemented in godot as in the Unity example. That is, whether you can have a 3D object find a path to any position on any axis and fly to it.

Navigation->NavigationMeshInstance->MeshInstance works really well in fairly flat settings, but not so well when there is no ground for the mesh to span limited polygons.

As shown in the Unity example, I'm looking for a way to move an object to another object - but not a linear movement but a bit smoother and maybe draw the path in the process.

Does this work like this (as shown in the Unity example) at all in godot?
I would also be willing for a donation if I get a simple example project, because the topic is not trivial and apparently not without reason almost nothing useful to godot is to be found on the Internet (apart from 2D pathfinding).

As described, like in the example I would like to be able to move an object from A to B. I like godot but just can't find a way to use it in the 3D setting I need.


This is not pathfinding. Its collision avoidance.
Godot have raycasting:
Its simple solution and as you see in video you have provided its easy to implement.

Thank you for pointing this out.

Unfortunately, I am still new and inexperienced in godot and do not know how to use raycasting based on the documentation. I haven't found any examples either (except 2D).

1 Answer

0 votes
Best answer

I have found a solution that works well for my use case. Thanks to all readers and helpers.

by (85 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.