Simulating Physics in Multiplayer

I tried ‘Physics’ in Multiplayer as a listen server. As you see, the client reads the movement of the object, but the Host doesn’t. What am I missing?

One more. At the beginning of grabbing the object, on the screen of the client, it trembles a bit and stops when it touches the floor. What makes it happen?

1 Like

The host is the authority, so anything that happens on it will be automatically replicated on the client-side. When you want an event in the client to also happen on the host, you’ll have to use an RPC so that the host knows what the client is doing must also be applied in the world.

Also, make sure that whatever you want to happen on all the clients is set to be replicated. Otherwise, it will only take place on one client. You can read the documentation on RPCs here:

1 Like

Okay then, to activate the RPC, Blueprint isn’t enough?
Must I touch C++code?
cuz I never done C++ before

You don’t need to use C++. Try to use StaticMeshActor instead :slight_smile:

The static mesh actor will fix your shaky cube, but it won’t fix the replication issues between the client and the server. You can’t really do RPCs with only blueprints, but what you can do is mark a function as an RPC from blueprints.

However, you can also use custom events and you can mark them as “replicated” from the blueprint editor. That’d be a way for you to technically create an RPC without coding anything.