AIController SetFocus what does it do?

For some time I thought that setting a pawn’s AIController focus to another actor (using the node SetFocus) made the pawn to always face that other actor, or attempt to using the rotation yaw speed.

But now that I’ve been trying to use it, it’s now really doing what I thought.

So my question is, what is the AIController focus purpose?

Thank you very much.

Does your pawn have any of the following set: bUseControllerRotationPitch, bUseControllerRotationYaw, bUseControllerRotationRoll? It possible the names changed recently so just look for “control rotation” in pawn’s properties.

Hope it helps.

–mieszko

It has UseControllerDesiredRotation set to true, UseControllerRotationYaw/Pitch/Roll set to false, OrientRotationToMovement set to false.

If the pawn is standing still, and it’s AIController has a focus actor set, it should change the pawn’s rotation to face the focus actor?

Hey,

Sorry for a very delayed response. I’ve just tested it and it seems to work. Have you tried the latest binaries (from github)?

–mieszko

I had OrientRotationToMovement set to true. I don’t remember why I posted above that it was false. Sorry about that.

I think that the best answer is: link text

1 Like

Just to clear things up, UseControllerDesiredRotation set to true, UseControllerRotationYaw/Pitch/Roll set to false, OrientRotationToMovement set to false are the correct settings in case this might help anyone.

3 Likes