Desired Rotation

In details panel of component we can set which axis should be allowed to rotate.
In most cases we only want to rotate owner horizontaly ( Yaw ), which is set by default.

How does component know in which direction it should rotate owner while its active?

For that Owner of RotatingComponent must implement interface I_RotatingComponent with function GetDesiredRotation

Then component uses this function to get target rotation.

This is example implementation on player which would rotate towards movement input when player is attacking.

For AI character it could look like that, to rotate towards target actor if its set.