Download

Help. Need to match orientation of client pawns to one other pawn in multiplayer

I have a multiplayer scenario and all is working well. One client is the boss and can teleport all other clients wherever they may be to a position near him.
The teleport works well but i need the orientation of the clients to match that of the boss (need them to look in the same direction)
I have tried a number of things but the orientations never match.
I’m setting the actor rotation from the server game mode.
Help would be appreciated.
(use controller pitch, yaw and roll is turned off for the pawn)

You would want to use Find Look at Rotation and set your actor rotation to that.

The boss character could be looking anywhere. I just need to match the orientation to the other characters. If I do look at the boss then the orientation would not be matching.
Also, I feel the issue is complicated by multiplayer setup. Where do I set the rotation as it seems sometimes the rotation that I am setting is not matched on the other clients. Even though I am setting it through the server.

So you are needing your players to look in the same direction as your boss?

Do you have your characters “Replicating Movement” or are you using a plugin like smooth sync?

They are replicating movement.
On some scenarios that I did in a trial and error fashion, it seems the client rotation does change and then snaps back to some other (sometime the original) orientation.
I do have orient to movement on, but at the time of teleporting, there is no movement. Otherwise the character rotation is decoupled from controller rotation (only camera is tied to controller rotation)
It feels like the server may be overriding the rotation, but it’s unclear why and how.

I am still unclear on what you are needing with rotation. So maybe some pictures or video would help.

Really good console command to tell if the server is overriding
p.NetShowCorrections 1

RPC Server event (run on server).

Server “Teleports” the boss. Then loops through the clients.
For each Client: Determine teleport to location (set local client teleport location), Determine actor rotation (set local client teleport rotation) → Teleport

Determining rotation: Find Look at Rotation (start: teleport to location, target: boss location)
This will rotate the actor (client) to face the boss actor.

Other option is to use Set Actor Location and Rotation, or chain Set Actor Location, then Set Actor Rotation.

Must be Run on Server.

If the client is initiating the event do…
Input action: switch has auth (remote) → Call run on server event.
Server Event: switch has authority (Auth) → teleport , rotate etc.