Rotation of attached actor not replicating over Dedicated Server

Hi,
i’ve got the following problem on my dedicated server setup: I’m spawning a Actor (e.g. a gun, currently just a red cube) and attach it to the pawn controlled by the player. Works without Problems and also replicates to other players.

Now i want to change the rotation of this actor based on the camera view. But the rotation won’t be send to the clients. In this picture the cube on the right should be rotated to the left, but currently it stays the same as it spawned (in both clients):

Picture Clients

That’s how i spawn the actor. I spawn it via a Server call which executes the spawn on the owning client:

Spawn Actor

That’s how i wanted to rotate the spawned actor:

Rotate Actor

If i switch the call “SERVER Rotate Actor” to just “Add actor local rotation” it works obviously on the owning client, but also doesn’t get replicated to other clients.

Here’s the Server call:

Server Call

All Server, Client and Multicast calls are set reliable.
Here are the replication settings from the blueprint of the attached actor (currently red cube)

Replication settings of the attached actor (red cube)

I’ve tried many ways and read many posts, but nothing seems to work. The more i read and try, the less i understand how it could work.

Can someone please help me with this? Or maybe suggest an alternative way to do this?

Thanks in advance :slight_smile:

Set the Gun actor (cube) to Replicates.
Have the Server Spawn & Attach it to the vehicle.
No multicast or RPC’s to owning needed.

For rotation use Base Aim Rotation to set the rotation to mimic camera.

1 Like

Awesome, thank you! It’s working as expected now :slight_smile: