My AI keeps switching between true/false in the perception area, flip flopping EVERY FRAME, causing my enemy character to rotate toward the player like the hand of a ticking clock instead of just a smooth turn to face the player. What’s wrong with perception that it thinks one frame it can’t see me, but another frame it thinks it can?
Behavior trees can get whacky sometimes. I’m not sure exactly what is wrong with yours, but here are some things that might be of note:
I believe all the blackboard keys get reset every time the tree goes back to the root (it does this whenever it completes the rightmost node that it has logic access to). So, if you just have it set to notice the player but no other task to complete upon seeing them, it might just be noticing the player for a split second and then returning to the root of the tree.
If that isn’t an issue, one other solution might be that if it does notice the player to immediately set a variable for the target inside of the blueprint rather than the behavior tree. Then, for sure, you will have some code access to the target that you can use as needed.