As you can see from the picture, the SELECTOR does not execute the child “Move To Position”, even when set as DYNAMIC, and task “Is Close To Target” does return failure.
Expected behavior is that “Move To Position” is executed when “Is Close To Target” returns failure. I have been debugging this for more than an hour with no success. Sometimes it executes, sometimes not.
Please see attached screenshot
I have put a debugger breakpoint into “Is Close To Target”, it runs the OnCheck() and it returns false. The breakpoint in “Move To Position” does not run for some reason, which does not make sense, as it should be next in order and executed after previous task failure.
I had this exact issue too. The problem here is that MoveToPosition returns success once the node succesfully reached that position. When trying to execute again, it will only call the Execute function if the previous result was Resting or Running.
What I’ve done is change the code in ActionNode.cs, where I also allow the ActionNode to reevaluate when the previous result was Success.
Like @rdt42 said, the Move to Target immediately returns success if the target is reached (which I believe makes sense). I wouldn’t suggest making that change to ActionNode since that is not a solution to making Move to Target execute and I don’t recommend that change even though it works for rdt42 🙂 You can change the Move to Target instead if you want to alter its behaviour though.
Thanks.
Join us on Discord: https://discord.gg/97q2Rjh
Author
Posts
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic.
Login
Register
By registering on this website you agree to our Privacy Policy.