BP_PlayerCharacter => SetActorRotation => Strong Jitter

Hi everybody,

I got a little Problem with my prjoect.
I’m teleporting the PlayerCharacter, and need to set the PlayerRotation.
But everytime I try, the screen starts to jitter very strong. No movement/playing possible.
Can anybody reproduce this issue?

Open any project (for example “Content Examples 4.2”), open the Char and add:

key “t” => SetActorRotation (0, 90, 0)

Compile, Save, Run, Press “T”

Then it starts to jitter. If I use SetActorRotation (0, 45, 0) nothing happens.

Is there any other way to set PlayerRotation into one special direction…?

Thanks and Greetings

Hey ,

I think what’s happening here is that the PlayerController’s “Control Rotation” is overriding your attempt to change the Pawn’s rotation. The default behavior is that bUseControllerRotationYaw is true on the Character, meaning the Character matches the view direction from things like mouse input. If you look at the default input bindings in the blueprint for the character, you’ll see an input event hooked up to “Add Controller Yaw Rotation” which does something similar (adds to the current rotation).

I suggest changing your key event to change the Control Rotation on the PlayerController instead and you should be good to go!

-Zak

Hi,

thank you for your answer, I’ll try that.
To set the target dircetion I may need to add something like AddYawInput “TargetRotation -/+ GetActorRotation”.
I think something like this will do it :slight_smile:

Greetings