0 votes

Hi,

how can I define a tile to be not usable for Astar pathfinding? (For characters not to occupy the same tile.)

I'm trying to implement setpointdisabled(), but since it only accepts integers, I cannot get it to work (with positions Vector2).

I also tried to erase() tiles from the Astar tile array, but that invokes weird behaviour.

Surely there must be an easy way that I haven't figured out?

Thanks for any input,
Anssi

in Engine by (51 points)

1 Answer

0 votes

For others: the easy way was to use function "point.x + map_size.x * point.y" to transform the Vector2 to an integer.

by (51 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.

Categories