Do you have a nav mesh bounds volume? If not, you can add one into your level and adjust its transformation until it covers all the surfaces you want your AI to be able to navigate in. Once you’re done with it, you can hit P on your keyboard to check. If you’ve done it correctly, you’ll see the valid surfaces painted green.
Alright, then I’d recommend Alt + Tab’ing back to the editor while the game is running and check out your behavior tree. Does the execution flow continuously trigger the Move To task? If not, your interface might be the problem. You can also check that by placing a Print String node after your Set Value as Bool node (or by toggling a breakpoint on it by hitting F9)
Other than that, we can’t see the default value of the name type variable in your AI controller BP that’s named “Key”. Make sure that it has the same name as your blackboard key.
Oh and also, both the AI character and the target should be on valid surfaces. Wanned to add that as well just to make sure.
Hmmm… Okay I replicated your exact setup and was able to succeed. I suspect your issue is about the interface, given that there wasn’t a mixup on the other points I listed.
Okay when i start the bool is false so move to doesn’t execute, as expected. When i interact with the door the bool turns to true and it starts executing the “move to” task but the ai character doesn’t move. Oh and its flickering but sometimes its smooth(just listing stuff idk if this changes anything).
Select the actor’s static mesh, and disable the Can Ever Affect Navigation property like this:
Also, notice that red hexagon underneath your AI character? The same property is also enabled for its capsule component. While that won’t stop the AI from reaching its target, will cause a little detour. To fix that, disable the property for the capsule component like this:
Still nothing, If you have any other ides pleas do tell. I will try to do this in another level or whole new project to see if maybe there is some bug.
Actually there is a difference, the flickering is gone in the Behavior tree execution, maybe that is just a visual bug or something
Okay, so that leaves the navigation. Could you provide a video showcasing the issue after disabling the Can Ever Affect Navigation property for the actor’s static mesh and the AI character’s capsule component? Make sure to also show the navigation while doing so.
You see in the video navigation is still obstructed underneath your actor that you want to be the target. Is that not the “door”? If so:
Select the “door” that’s in the middle of the scene. While having it selected, navigate to the Details window on the bottom right (with a pencil icon on it)
Inside the Details window, select the static mesh component (that’s not what’s going to be selected initially by default)
And lastly, disable the Can Ever Affect Navigation property for the static mesh component of the actor that the AI character should move towards
Well, I was able to produce successful results upon replicating your setup. Perhaps it’s about some settings you’ve tinkered with, or there’s an error in the implementation.
I’d recommend creating a new project (in my testing I used the third person template) and carefully implementing the necessary steps. You might also wanna advance in stages, by first placing the nav mesh and executing an AI Move To node on Begin Play, then doing the same inside your custom AI controller, then creating a blackboard and a behavior tree, now running the behavior tree on Begin Play inside the custom AI controller, and triggering a custom task in the behavior tree that prints an on screen message, after that you can move on with creating a new object type blackboard key in your blackboard, setting its base class as the actor class, setting its value as the player character, and using it in a Move To task, if everything works fine you can then use a different actor as the target, and finally you can add your custom decorator as the condition (but I’d recommend setting the target on interaction and checking if it’s valid instead of having an obsolete bool type variable for it)
If you encounter any issues in the progress, make sure to share all the steps you’ve taken to get there, and at which point the issue arises.
Okay i went in my custom AI controller and i set the value of the blackboard key instead of using the dropdown menu i used “get player character” and it worked it started moving towards the player.