SetFocus not working

Set Focus Is not working for me.

I have followed the implementation of SetFocus and PlayerPawn but Enemy is still not Focusing on Player.

Any insights on the problem that might affect this? Would it be the PlayerCharacter is not configured correctly?

What do you get if you log the focus actor after setting it?

EDIT: My solution in Unreal 5.1 was to recreate the AIController, implement the code in C++, and then create the blueprint subclass. Seems to be a running issue in 5.1. So the controller class probably does not need to be recreated, just a quick delete of the existing subclass and then remake.

I am having the same issue.

The focus actor is correct, the Player_Start is set up to receive control from Player_Index 0 and the AI controller is plugged into the ShooterChar blueprint as the default controller. I have restarted the editor just to check.

Could it have anything to do with who is controlling the rotation of the character somewhere? What exactly are we focusing? Is is using the transforms of AActor/APawn/ACharacter? My ShooterChar blueprint contains a camera but I’m assuming the AI controller doesn’t need access to it.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms