UseControllerDesiredRotation broken in 4.7

I admit I’m still a little unclear on the intended usage of ControlRotation, for both player and AI characters, however there is clearly an issue introduced in 4.7 relating to this flag.

The AAIController::UpdateControlRotation() method has been altered, and now if there is no focus set, resets ControlRotation to be whatever the pawn’s current rotation is. I was using the above flag and calling SetControlRotation in order for the character to be smoothly rotated to the rotation I gave, however since the value is now immediately overwritten, the character of course does not rotate.

You’ve been using Controller::SetControlRotation to make sure pawn rotates smoothly? Why controlling pawn’s rotation directly? I’m asking because current behavior is the desired one, we don’t recommend micro-controlling AI. If you want your AI to look at a specific location you set its focus and let the underlying code do the heavy lifting. If you want to micromanage I recommend you did that on pawn movement component’s level.

But I’m opened for suggestions :smiley:

Cheers,

–mieszko

I see, so then AAIController::SetControlRotation is not meant to ever be called externally? Since it internally overwrites it on every tick.

I’m not sure my use case can be handled by the existing controller focus code. The core of what I’m doing requires my character’s head rotation to be decoupled from its torso/actor rotation. So while my character does have a focus point/direction, I don’t want the character as a whole to be rotated towards it - I need to manually calculate and tell it what both its actor rotation and head bone rotation should be.

Would you agree that in this instance I really need to disable UseControllerDesiredRotation, and directly update my character’s actor rotation, perhaps in UCharacterMovementComponent::PhysicsRotation? Thanks.

uncheck AIController’s “Set Control Rotation from Pawn Orientation” and don’t set focus work for me. UpdateControlRotation will be disable