0 votes

Hey, i'm using qodot to create a downloaded map at runtime (in 3d), and i need my enimies to pathfind to a place on that terrain. I read that pathfinding requires to bake something, but the map needs to be generated at runtime...

Godot version 3.5.stable
in Engine by (65 points)

1 Answer

0 votes
Best answer

What you need for pathfinding is a directed graph, in which nodes are spots on the map you can get to, and edges specify the cost of getting from each node to its neighbors.

Since your map is generated at runtime, it's only a matter of generating the graph along with it.

by (48 points)
selected by

@ceayo: I didn't know, but it seems Godot already has what you need to do pathfinding: https://godotengine.org/qa/121075/am-i-wasting-my-time-with-gdscript?show=121122#c121122

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 Frequently asked questions and 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 [email protected] with your username.