AI SetFocus not working correctly?

I’m trying to get my AI to move while still looking at the player after it attacks. Multiple people recommended the SetFocus node but it didn’t help. I put the Set Focus node with my AI connected (this is in Behavior Trees) then had a reference to my Player as the target. SetFocus execute to SimpleMove. It still just turns around and runs. What am I missing here?

Have you unticked UseControllerRotationYaw from the pawn and ticked UseControllerDesiredRotation in CharacterMovementComponent?

9 Likes

I Just want to to know, that this your answer helped me - 1 & 1/2 after you posted it- too. Thanks!

1 Like

Same here.

ClearFocus wasn’t working for me and this fixed it. Thank you.

So what if both of those boxes are already tick/unticked as you say but the AI still isn’t turning?

also make sure “Orient Rotation to Movement” is unchecked