Closed AnthonyvW closed 1 year ago
This appears to be due to the center of blocks being offset by 0.5. Line 720 in PathfindingTask.cpp compensates for this when the coordinates are positive, but that compensation causes the destination to be wrong when the coordinates are negative.
Overall this seems to be more of an issue with how intuitive the input is. Since the coordinates gotten from F3 don't seem to make a difference if you specify the center of the block or the corner the user won't know to compensate for the 0.5 being added to the coordinate by subtracting one from the X and Z coordinates.
Thanks for the report and the detailed repro steps 👍
Will look into it today, it should not be too hard to fix
I can't seem to reproduce the issue on my side.
If I use BCChatCommand goto -15 1 -9
the bot ends up at -14.5 1 -8.5
i.e. at the center of the block with coordinates -15 1 -9
.
The whole pathfinding system is block based and the bot will always go from the center of one block to the center of the next. So I feel it's more natural to have the input as block coordinates and then add the 0.5 rather than ask user to always make sure they specify .5 coordinates to make sure it's the center of a block.
Let me know if there is something I misunderstood.
In example 2 pathfinding to a location results in pathfinding to the block next to it when the respective coordinate is negative. When the coordinates are positive pathfinding works just fine.
Steps to Reproduce
It will always pathfind to the block's coordinates +1 on the X and Z axis when those coordinates are negative.