AI controller won't move towards sound location to investigate it. How do I fix it?

So, basically I pass stimulus location to ai blackboard and tell ai to move towards that location, but after ai hears that sound it sets it’s state as investigating and just doesn’t do anything.

image

Hey @KIDOSIK_NASWEI1!

To help with this, you should watch your behavior tree while the game is running! That way you can watch it and even go step by step through the tree alongside the AI. If there are more than one in the scene with this BT you will have to select the actor from the dropdown at the top of the window. :slight_smile: The goal here is to see if “MoveTo” is getting called, and if it isn’t, where the chain is broken.

Hope that helps! Get back to us!

1 Like

Thanks, that helped a little. It turns out there’s some kind of problem with moving to the stimulus location. When I tried to put 0 0 0 in target location it actually moved to that location with no problem. Tried to put a little delay inbetween the noise node and passing the stimulus location to blackboard, doesn’t work.

It actually passes the value to BT, but it starts to abort and execute itself infinetly, even tho there’s no any errors with finish executions on any task

What is the AI’s hearing range? Check that.

I checked it with AI debug mode and it definetly hears the noise (draws a sphere and sends noise location to BT)

Actually I found a solution.
It turns out that because of Z value in noise stimulus location, AI wasn’t able to move to it. Multiplied it by 0 and now it works fine.
Thanks for helping anyway guys

1 Like