0 votes

Hi,

When I use "get_simple_path()" on an isometric grid, it happens that the last point returned by get_simple_path is pixels away from the one given in Input.

For example (based on an isometric tilemap 64x32):
'path = getsimplepath(Vector2(0, 0), Vector2(128, 64))'
'# path = [(0, 0), (64, 32) (125.308, 72.514)]'

Setting optimization argument to true or false doesn't change anything.

Is this a known issue of getsimplepath() or is there a way to avoid it?

Godot version 3.4.4 stable
in Engine by (16 points)
edited by

From what I've read on the Godot documentation, the get_simple_path() function has known issues (though I don't know what's causing the issues). To remedy this, it may be best to check whether the object that's using get_simple_path() is within a certain margin of its destination, and use the end point when it's near to the end to "push" the object there.

Your idea is good, I just need to make sure that the error at the end point remains reasonable. Thank you.

Please log in or register to answer this question.

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.