-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Won't tower to correct Y level / Pathing #71
Comments
You can turn bot.pathfinder.thinkTimeout to a higher value. The default is 40ms. Higher values will give more stable results but can cause issues since a physics tick is only 50ms. This is usually okay if you aren't running the pathfinder every frame, however. |
I have tested changing this value prior to opening this issue, however, I get the same/similar results each time. Are you not experiencing the same timeouts/incorrect paths when testing what I described above? |
Update: For anyone who may be interested. I have "solved" this, but it's very hacky, and it should be resolved via that actual pathfinding mechanics. Essentially my hotfix is a position checker that is run every physicTick. bot.on calls a checker function I made. The way this function works is checking if the bot has a target player or location variable set. If it does, it checks if the bot is moving. If the bot is moving, then do nothing. If the bot has stopped moving and the absolute value of its position minus the target position x y or z is greater than a threshold (I have 0.6 of a block) then it will reset its goal to be that target players position and or the Vec3 coordinate position variable (that I have made, so that I may tell the bot to go to certain coordinates). This works wonders and the bot will now tower up until reaching the specified coordinates or player (no longer stops beneath them for no reason). Issues with this:
Comments: I am sure my way of doing this is incredibly inefficient, however, at this stage it's not my intention for it to be clean, I was just messing around with it and seeing what I could do. To be honest I am just learning JS as I go and this is the first API I've ever worked with. |
This was not a timeout issue this time but a legitimate bug in the move generation logic preventing it to plan towers of more than 1 block high. Should be fixed now. Thanks for reporting it! |
When giving the bot a coordinate to get to E.g: 650, 35, 350 (X,Y,Z) It will go to the correct X and Z, then it will tower up 2 blocks or so before stopping (at the incorrect y level). Re running the command the bot will then tower up 1 block at a time for each time the command is run. (Usually worse results when the Y level supplied is much greater than it's current level)
From what I have seen with testing, the bot also does not see towering as a viable pathing strategy. Rather than towering directly up 13 blocks it decided to run 8 or so blocks to higher ground, before towering up 7 and across 8.
Edit:
I forgot to mention the same applies when telling the bot to come / follow. Although I have it set to be at a distance of 1 or 0 each time I test it, the bot either does not take into account the distance of the Y level or fails to create the pathing. If I fly directly above the bot, rather than towering up to me, it will build up a little bit and then just stand still. If I move left or right then it will begin to staircase up.
Edit 2:
The status of the pathfinding is that it's timing out. However I am unsure why, I am still examining the code. I'm sure someone who has actually contributed to this repo would have an idea of why.
The text was updated successfully, but these errors were encountered: