0 votes

Hi,
You only need to look at the title to know what I want.
In Youtube I found some tutorials about how can I do this, but I believe that they are obsolete, because these videos do not work in my godot engine.
So, I know that the Navigation get_simple_path function returns an array of points between the given positions, which can be got by calling the global_transform.origin of any 3D node. But I want to know how I can use the given array and use it in the current versions of godot engine and in Godot 4.
I use GDScript
Thanks in advanced.

Godot version 3.3.2
in Engine by (115 points)
edited by

1 Answer

+1 vote
Best answer

There's a "3D Navmesh Demo" stock template project, which demonstrates a navigation.
In that project character plots a path to randomly clicked target point (Vector3).
In your case you should change this target to your player's position.

by (1,438 points)
selected by

It does not work, happens the same that in the other tutorials.
You have a WORKING code for this?

Said sample works for me.
Please be specific, what kind of error message do you get?

But for meke the enemy follow player?

Ok thank you for the information.

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.