Hi everyone, I'm pretty new to using PlayMaker with Unity and I've run into a problem with my enemy AI FSM that I can't seem to solve. For context, PlayMaker uses a visual state machine system with states, actions, and transitions to control behaviors in Unity, which is why I’m trying to handle my enemy logic entirely through FSMs instead of C# scripts.
Right now my enemy has three states: Idle → Chase → Attack. In the Idle state I'm using Get Distance to check the distance between the enemy and the player, then I send an event called PLAYER_NEAR when the player is within 10 units. The transition to the Chase state is set up correctly, and I can see the event firing in the debugger, but the FSM sometimes just stays in Idle and never transitions.
What’s confusing is that it works sometimes, but other times it doesn’t trigger at all even though the distance value clearly drops below 10. I’m wondering if I’m misusing the Every Frame option or if my event setup is wrong somewhere. Has anyone run into this before or knows the correct way to reliably trigger a state transition based on distance? Any help would be really appreciated!