Client authoritative transform

Hi, I’m making a multiplayer VR game where each player has a special ball. I want the ball to have client authoritative transform / movement and I have not been able to get it working. The ball does not need to collide with other player’s balls. Cheating is not a concern for the game. Below is how the ball’s position can be changed:

player holds ball with a physics handle

actor component on the ball that sets the balls location and rotation while ball is in flight

physics simulation for when the ball collides with the the world

Given the above ways that the ball’s position can be changed by it’s owner, is it possible to just replicate the ball’s transform using the owning clients data? I want the ball’s position to be extremely smooth, as smooth as offline play for the owning player.

The ball is a blueprint inheriting from StaticMeshActor. On the class defaults I have set replicate movement true, net load on client true, replicates true, replicate physics to autonomous proxy to false.

When in a multiplayer session the ball transform only changes for the owning player.

Does anyone have any thoughts or suggestions?

Replication system only works Server → client. So your ball cannot use replication. You have to do it all manually.

On change RPC the new values to the server proxy. Have the server proxy update its transform (snap), then multicast that value to other clients (sims). Have the Sim proxy update the ball.

For this to be smooth you’ll need to write a buffer and interpolate update to update on sims.

A → B…set new A.
A → B…set new A.
A → B…set new A.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.