Camera jitter on "Set Actor Rotation" UE5.5

When I use “set actor rotation” to spin me to face my enemy, there’s a frame with this strange camera jitter. I tried debugging it with adding a set key and upon pressing it, it will spin my character to face the enemy and it works just fine without the camera jitter. But for some reason only when I counter my enemy’s attack and call the event will it do this jitter.
Also for some reason it’s not letting me add attachments even though I’ve been a user for 3 years.

So your ‘Spin To Face Enemy’ functionality works in isolation, but specifically after performing a ‘Counter Action’ the character camera jitters when ‘Spin To Face Enemy’ executes.

What happens when you perform a ‘Counter Action’ without executing the ‘Spin To Face Enemy’? Are there any camera jitters?

1 Like

No, the logic that ran the counter worked up until I used the “Set actor rotation” node. (For context, the enemy will attack me, a sphere trace will fire on the weapon. This is done inside the enemy’s blueprint. I have a collision sphere in front of my player and upon clicking, it will appear for a slight moment to check if the enemy’s trace is there. If it is, it fires and calls an interface event message from my “BCA combat,” an actor component where all my main logic from player-enemy is. This is where my set actor rotation is) I tried a teleport node before this and it was also giving me the same result. I also tried it without playing the animation montage on my player and it still happens. Thanks for trying to help btw :slight_smile:

Here’s my email if you want to see images/videos of error: Denberz1507z@gmail.com

Set Control Rotation is what you’re looking for.

Jitter is caused by the server correcting your bad rotation.

But doesn’t this only reset the camera to the wanted position? Is there a way to ONLY move the player without touching the camera components? And for reference, it does work perfectly fine when I set up a keybind e.g “8.” This will trigger my interface event to fire which fixes the player’s rotation without affecting the camera. But upon countering (which is inside my enemy BP, since the enemy sphere trace is checking if it hit the collision sphere on my player) it will call the exact same function as a message and will work except with the camera jitter.
Also just saying; I am fairly new to UE programming :slight_smile:

Control Rotation values are used to rotate the Capsule Component. The Capsule Component is the character, not the mesh. The mesh is just a visual representative attached to the capsule.

If you ever see jitter when using character movement component (cmc) the first thing you look at is server correction. You can enable the correction debug in console p.NetShowCorrections 1.

All new devs using First/Third Person template as a base should read the CMC docs. Specifically the networking one.

CMC utilizes client-side prediction which loosely defined is “Apply to Self, then Server”.

Here’s a screenshot of the flow. I do recommend reading the entire page.

In a nutshell your applied rotation isn’t matching what the server’s is, so it sends a correction. Set Actor Rotation does not replicate. The values used in Control Rotation do get replicated. Thus they get applied on the servers proxy.

Okay I understand that. I will read through it! But to get everything to work how it should, what can I do? I have my Counter Event, exec pin into the “Set Control Rotation” node with the target being “Get player controller” which then for the location I split each value, added a “Get actor rotation” node which the target it my Enemy. Z adds 180 so that my player is always 180 of where the enemy is currently facing to properly rotate upon countering. This rotates only the camera to face opposite of the enemy and nothing more

Loot at Rotation = Get Look at Rotation (Target location, Your Location)
Set Control Rotation ( Look at Rotation [X,Y])



Okay I did as you said and it still results in the same thing. Camera will zap to the target location, which is my enemy, still won’t change my character’s current z rotation. I linked the video of what is happening, along with the screen shot of the code. Hope that helps!

Works 100% and is CMC and Multiplayer correct.


I can wish for it to work but it still doesn’t. I created a fully basic project from scratch to test it and it still resulted the same. With Use Controller Rotation Yaw enabled; it will work however. But this project and my other doesn’t use that. Everything in the image is inside my third person character blueprint. Target being this BP block.
Set Actor Rotation has been the only successful node to rotate my player (which is a ref to the entire player blueprint, which is moving capsule component and everything attached when watching collision debug)

When the character needs to rotate to target, enable controller rotation, then swap back after rotation has completed.

This does work and in situations and would 100% be reliable in certain scenarios. Though in my case I only want the player to move. Nothing more. Is there any possible way to achieve this without involving the camera at all and encountering the camera jitter?
Thanks for the quick replies also :slight_smile:

Make sure your math is right?

99.9% of the times it’s either you doing math wrong or the engine is doing math wrong for you.

Commonly, you see this on anything the engine does that causes a rotation to flip between 360 and 0.

As far as what the original user is trying to do: you just need something more.
Nothing you described is even close to how cameras must be handled.

Have a look at this youtube series for some ideas and examples.

The main takeaway is - a camera is a camera. The character is the character.
You need to truly uncouple the 2 things to get complex effects and transitions that are half decent.

Problem here is he’s using character movement component (CMC). Anything applied to the autonomous proxy (rotate capsule component) must be applied to the server proxy, or it will be corrected… hence the jitter (correction) with set actor rotation.

Only way around it is to have the server proxy react to the target in the same way.

On key press → rotate capsule → RPC server to react the same. Client and server must use the exact same code. Client cannot pass target ref or rotation values. Server has to determine those on its own.

The math I’m pretty sure is correct. It works perfectly fine when fired off by an input key e.g: 8. It’s just when 2 blueprints are involved, one telling the other to do something that’s making this jitter appear in the first place. It’s odd

Don’t know if my response was used as a reply. I sent it below your message at the top

Detatch the camera. Is there still jitter present?

No? The issue was the camera setup.

Yes? Then the issue is the rotation itself as noted by @Rev0verDrive.

Based on that, you can figure out what to do to fix it.
The camera is purely client side (shouldn’t be replicated at all).

I know it’s been the camera all along. It’s the only thing that could alter the viewport for a moment. I came here to fix it. I haven’t altered the camera at all from the third person template; it’s the base camera, set to every default setting.



I have the exact event being called as shown in the one image. One has 4 as the input. The other is my counter event.
The counter logic runs inside my enemy component (this is the default parent enemy class) If there is anything inside there that points to an issue, let me know. (FYI, for the actor has tag nodes, “Counter” is to check if my player’s collision box is present, if it is, the counter logic will fire, if false, damage will be applied.

The issue is probably orient rotation to movement - as I said, you need an advanced camera setup; Not whatever was there on char class - in order to do “nice” things with…