# Rotating my pawn in code is causing the camera to jitter.

**URL:** <https://forums.unrealengine.com/t/rotating-my-pawn-in-code-is-causing-the-camera-to-jitter/391540>\
**Category:** Cinematics & Media\
**Tags:** actor-rotation, unreal-engine, question\
**Created:** [April 21, 2017, 5:59pm UTC](https://forums.unrealengine.com/t/rotating-my-pawn-in-code-is-causing-the-camera-to-jitter/391540 "2017-04-21T17:59:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_fa2636ac](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_fa2636ac](https://forums.unrealengine.com/u/anonymous_user_fa2636ac)\
**Post date:** [April 21, 2017, 5:59pm UTC](https://forums.unrealengine.com/t/rotating-my-pawn-in-code-is-causing-the-camera-to-jitter/391540/1 "2017-04-21T17:59:53Z")

</div>

I have a pawn that is strafing using root motion. I want to slowly rotate him to face his movement direction, and I have tried to trick CharacterMovementComponent into thinking I am moving, with the OrientRotationToMovement set, but this doesn’t seem to work. So, I tried to rotate the character manually using AddActorLocalRotation, which works, but this is causing my camera to jitter. I realize that a better solution may be to add in the rotation as a root motion blend which may get me the benefit of leans. But in the meantime, any ideas to fix the camera jittering?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_fa2636ac](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_fa2636ac](https://forums.unrealengine.com/u/anonymous_user_fa2636ac)\
**Post date:** [April 25, 2017, 2:37pm UTC](https://forums.unrealengine.com/t/rotating-my-pawn-in-code-is-causing-the-camera-to-jitter/391540/2 "2017-04-25T14:37:37Z")

</div>

I was able to fix this by moving where the rotation of the character occurs. When I moved it to occur in a notify state from the animation, then the camera jitter went away. I assume this is simply due to where it occurs in the frame.

---

<div class="post-metadata">

**Author:** ![HakkerBarry](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HakkerBarry](https://forums.unrealengine.com/u/HakkerBarry)\
**Post date:** [December 19, 2022, 6:31pm UTC](https://forums.unrealengine.com/t/rotating-my-pawn-in-code-is-causing-the-camera-to-jitter/391540/3 "2022-12-19T18:31:30Z")

</div>

I got the same issue when I did the Set Rotation in the Anim Notify State. The camera still jitters, which part do you think it’s going wrong?
