This video aims to solve the issue of setting up navigation baking in combination with Tilemap collisions since it was not as straight forward.
A very important aspect to notice is that the navigation area calculation based on the active collisions works only if those collisions are on the layer 0 of the tilemap. More information on this can be found in this discussion: github.com/godotengine/godot/...
Additional thanks go to @abradotcs for making this video which was the inspiration for the initial setup of the navigation agent: • 2D Navigation/Pathfind...
The tileset assets are from schwarnhild: schwarnhild.itch.io/basic-til...
Thanks a lot for the time and effort you put into making those!
Last thing to note is that, even if I set a timer and I kept updating the target position, that part was not put into evidence very much, as the target I created was not moving. However, if I had a moving target, the path would have been recreated to follow the new position.
Around 9:41 move_and_slide() in contrast to move_and_collide(), does not require a vector which is pre-multiplied by delta, as it is taken into account already. Thanks @Limited_Film_Works_ for pointing that out.
--------------------
Github repository for this project:
github.com/cashew-olddew/godo...
Support me on Ko-Fi: ko-fi.com/cashewolddew
--------------------
#godot #gamedev #pathfinding
2 июн 2024