My AI is made with blueprints, behavior trees and it has an animation blueprint. To reload, my AI has to crouch and then play the reload animation. The reload action is in the behavior tree, it forces AI controller to change isCrouching and isReloading bools, which are then being noticed by the animation blueprint and force Reload state in locomotion. Nothing special.
But there’s a problem. When the AI is far enough (like 2000 units) and is standing behind a cover, he crouches to reload and gets out of sight. Then he gets stuck in a crouched position, never updates his animation, never uncrouches, and continues to do what behavior tree says like shooting. And he’s shooting into the cover that’s in front of him.
This never happens if the player is close or I use unpossess to see what AI is doing from above. He updates his anims properly, so it isn’t a logic bug. I came to the conclusion that he stops playing any animation while being out of sight (I have a couple of other evidences).
This disrupts the AI behavior greatly as the distant AIs never uncrouch until I get close or flank them. Any solutions? How to force AI playing anims even if I don’t see him? Thanks.