Set View Target with clients don't follow camera rotation

Basically i’ve got a spectating system for my game and everything works fine except for one thing:

As you can see, server follows the camera rotation and location but client only follows the location. Any way to fix this? Here’s the code:

Thanks in advance! :slight_smile:

Bumping this…

Bumping this…

Clients does not have access to other players controllers, only server does.

You can create a variable to store camera rotation, replicate it and use it to change camera rotation.

Make sure to make a check if it’s not a server and not owning player.

hey, thx for answering. not sure why but still not working


Because you are updating it on the client side.

This should do (didn’t test it):

ty for asnwering but still not working :frowning:
Captura de pantalla 2024-03-17 172759

It’s probably because your arm uses controller rotation.

On the client side only their own controller exists, so for others rotation will be 0.

This should fix it:

still not working



I tested my code, works fine.

You need to review your code for overlaps of code.
Maybe, somewhere rotation is updated also, that negates my code.

(Top left - spectator player; bottom right - player that being spectated)

okay seems that the initial issue was that the use pawn control rotation branch in event beginplay wasnt executing so i put it at the event’s start and it works now except one thing: the target player only changes the spectator’s yaw but when the target player looks up or down the spectator doesnt. any way to fix this? thx in advance!

When I tested, all axis worked.

You need to review your code a bit more.

You can use the search to find references to your spring arm.

Can u send me a screenshot of your spring arm settings? maybe it’s related to that

I used UE’s 3rd person template.

yeah, its the same as yours, tried looking all the spring arm refs but all the ones are from this system, also replaced set control rotation with world rotation but its the same. Also checked that the pitch is replicating correctly and it does. idk what is wrong, could u sent me just in case your set rotation code? ty in advance!


That’s all the code that I did.

Create 3rd person template project and paste this code and see it for yourself, and go from there.

yeah it works on a 3rd person project but idk why in my project not, the only changed setting is use controller rotation yaw which is required for the true first person to work.

I have created true first person myself once, but I didn’t control the camera.
Rather, I controlled the rig, with attached camera to it.

All I needed is up/down rotation to control the rig in animation blueprint.