When attempting to set character rotation, which is controlled with an AI controller, the Set Control rotation simply does nothing. Or well, it changes the control rotation, but the character does not rotate to the new rotation.
Settings “Use Controllers Desired Rotation” is set to true and “Use controller rotation yaw” is set to false.
This setup works with the “Set Actor Rotation”, but it changes the actors rotation instantly, and my project requires smooth turning using the control rotation function.
3 Likes
Bump
have you find a solution?
Bump
AI is Owned and Controlled by the server, so its Control Rotation has to be set on the Server.
Try a Branch (is Server) just before set control rotation.
Also the Event Attack
needs to be called from the server on its copy of the AI.
While this is an old thread, it was the top Google result for me, so I’ll add what worked in my project.
I had missed that when I created a new blueprint subclassing AI controller, it has a flag Set Control Rotation from Pawn Orientation
:
Ticking that off fixed the problem for me, where now the controller is in charge of rotation, rather than the pawn.
Behind the Scenes…
In the C++ for AIController, we can check out what’s going on.
- It always gets the Control Rotation
- But if that checkbox is set, it overwrites it with the pawn’s rotation