0 votes

Hi i am working on ff tactics wanabe game, and i have this grid map, and a navigation mesh that works pretty well, but i need to snapp the units movement to the grid. I managed to snapp them to step in the center of each block of the grid, but when they are supose to go from (1,1) to (2,2) they go directly through the diagonal, and i need them to take an inner step like (2,1) or (1,2).

Is there any way to make that with some parameter in the navigation mesh, like 90º turns, or something?

Godot version V3.3
in Engine by (35 points)

I think in 2D you can make the navigation polygon a + and it will navigate as you desire. You should be able to do something analogous in 3D. Just be careful when drawing the navigation polygons to make sure all sides of the + match up with the opposite corresponding spots (e.g. east and west).

If that doesn't work I know you can set up an AStar path finding node to do what you desire.

1 Answer

0 votes

you can make the navigation mesh of the tiles of the grid map cross-shaped: each tile is connected only on the four directions, no diagonal.

by (1,455 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.