For example I want to make, when a door of a car opens the two players see it fall at the same time and sync, how do I do that? The first player sees it well fall but the second sees it stuck and can not go down for that.
The car is a swat truck, the door is the behind one and the door rotates down.
Anyone who can help me, please?
You probably want to make your door opening function an RPC, so that it is executed on all clients
1 Like
Yes! How I do that?
This tutorial covers the basics of using RPCs in UNET Unity Learn
I don’t use UNET myself, I prefer PUN as I find it more straightforward in almost every respect.
How I would do it is the player that presses the button to open the door calls a command on their own player object. The command runs on the server, which calls some method on the vehicle gameobject that you use on the server to trigger the door to open. That method then calls a client RPC on itself that runs the door opening animation on all clients.
1 Like