This branch brings in an asynchronous implementation of Lazy Theta* pathfinding and converts the MovementPlugin to use it. These are still rough to say the least, but I'd rather have them be rough in mainline than languish in my branch where they get significantly less exposure.
Notably, at the moment the way Physics, Pathfinding, and Movement interact results in movement just "getting close" to target positions rather than actually arriving exactly at the position. This is because it's difficult to do maneuvers such a jumping when you interrupt Physics, but it is equally difficult to reach an exact position if you don't interupt Physics (instead relying on friction/drag to stop movement).
Still, these details can be figured out with time, just like when the original Physics implementation landed, I'm happy with this code maturing futher in mainline.
Simple plugin usage example: https://gist.github.com/nickelpro/098e7158019365f67de6
Note that the vast majority of that plugin is chat handling, ~10 lines handles looking at the target, and a single line is relegated for movement.
Fufills https://github.com/SpockBotMC/SpockBot/issues/128
This branch brings in an asynchronous implementation of Lazy Theta* pathfinding and converts the MovementPlugin to use it. These are still rough to say the least, but I'd rather have them be rough in mainline than languish in my branch where they get significantly less exposure.
Notably, at the moment the way Physics, Pathfinding, and Movement interact results in movement just "getting close" to target positions rather than actually arriving exactly at the position. This is because it's difficult to do maneuvers such a jumping when you interrupt Physics, but it is equally difficult to reach an exact position if you don't interupt Physics (instead relying on friction/drag to stop movement).
Still, these details can be figured out with time, just like when the original Physics implementation landed, I'm happy with this code maturing futher in mainline.
Simple plugin usage example: https://gist.github.com/nickelpro/098e7158019365f67de6 Note that the vast majority of that plugin is chat handling, ~10 lines handles looking at the target, and a single line is relegated for movement.