Hello! So I have two enemies with the same behaviour tree, just different blueprints. But one of them can move towards the player normally, while the other can’t move, completly stuck in place. The settings in both blueprints for pawn sensing and collisions are the same, so I can’t figure out what is wrong with one of them.
Here are two pictures taken of AI debug, you can clearly see the green path for the one thats working, and for the broken one, it is very small and appears for one frame.
Are you using a navmesh or what? I’ve done a lot of AI work but I haven’t had the chance to see the green rectangle like this.
We need more information about how what you’re doing works- the pictures are great but there’s definitely a good deal more information we need- it’s possible you may have some broken capabilities from switching out the blueprint. Possibly a failed cast in a custom task or something could be the issue but it’s hard to say just by a picture.
This is their behiavour. During debug, I can see that they both circle through the tree the same way, I mean, the smaller isn’t getting stuck or anything.
Okay. So looking at this tree, thankfully there aren’t TOO many things to watch for.
During debug everything updates, however… what IS that green square? I’m thinking it’s the IsPlayerInMeleeRange service? That seems like the place to check, make sure the tree is still flowing after that first bit. I think the reason it’s only happening for a frame is possibly the cooldowns, and the service only checks for one frame and then has to wait. If for some reason the “MeleeRange” variable is set to 0 on the second one maybe that could be the issue?
Also the ChasePlayer Task. What does that look like? We at least know that it is GETTING a target location, but what is the code inside looking like? Is that getting to act?
Sorry, had to step out of developing for a couple of days. I’m not sure what the green square is myself, but because of the way it shows for the one is working, it’s always a grid that shows the path to the player.
I just fixed it by duplicating the blueprint for the enemy that works and changing the mesh. AKA, the problem wasn’t on the BT, but on the blueprint. I may have changed some setting in the blueprint that I couldnt find (and I searched a lot!) that was preventing the little guy from moving.