How can I replicate the pitch of my characters spot light/flashlight? I followed some tutorials but no luck.

How can I replicate the spotlights pitch (Looking up and down) so that all other players can see the movement of where the player is looking/shining it. So far they can only see left and right movement. Im using a third person character bp where I have set it up to be a true first person view.




Controller → Get control rotation

I used it in my blueprints already, maybe I don’t have it setup correctly?

How are you moving it on the client? Shouldn’t use control rotation for client, nor should you ever pass rotation to the server. Server should resolve its own rotation value based on input commands processed.

I’m still learning so sorry if I didn’t answer your question correctly. I deleted the code you said I shouldn’t pass it to the server. And down below is the code for what makes it replicate and the clients can see it moving fine and it works except the y axis of the light is being doubled and I really don’t like the look and feel to it (Example in gif 1).

Here is how the replicated version of the light is moving.
Replicated_AdobeExpress
And here is how it moves without the code I posted so non replicated and I’m not sure how to go about it to make it look this way when its replicated.
Not_Replicated_AdobeExpress

i got the same error too… so if you got a solution, please share it with us.

Use Base Aim Rotation in Pawn. You don’t have to replicate and variables, this is already handled.

1 Like

Awesome you are the best :+1: +1rep…
Now it works great for me!