0 votes

I am looking for an example or a tutorial how pathfinding works in real 3D (x,y,z) environment. Many examples show how an enemy follows a player, but in the end this is (x,y or two axes) - so 2D pathfinding in 3D environment.

I want to make a small simple project with a closed transparent box in which an object (doesn't matter, the main thing is simple) can search for a way to any point in the available space inside the box. In the box are distributed at different positions (not only on the ground) other objects, through which the object must not fly. If the goal is reached, a new goal is given and the object searches its way through the available space again. A camera is stationary at a fixed position and watches what happens in the box.

Is something like this feasible at all and are there any examples?
I would like to learn about this and would appreciate any tips or examples.

Godot version 3.2
in Engine by (85 points)

1 Answer

+2 votes
Best answer

Please see out this video tutorial:
For goals set enemy's reference to a Positon3D which should be situated at the goal's location

by (884 points)
selected by

Thanks for the video, that is unfortunately incomplete because of the missing character controller and for me not completely comprehensible. For me the whole thing still looks like only 2 axes, because the height of the NavigationMesh can be maximum 1 and does not fill the available space. If in that case the character would fly upwards, Enemy2 could not follow based on a path search.

I think I had fundamentally not understood something there, but now I'm slowly getting through it. It should work as you write. Thanks again!

I am happy because you can do it now :)

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.