I have a simple door that uses an interface and RPC events to work in multiplayer. The door works flawlessly if the door blueprint is part of the map when it is loaded. However, when I spawn the actor blueprint after the actor has loaded when I “use” the door to open it instead of opening it creates a second mesh at the opened rotation. It’s very odd. Anyone know why this is happening?
This is what is probably happening:
- On the server, you call Spawn Actor and create a single door. Since it is marked for replication, that door will get replicated to all clients.
- On the client, you are also calling Spawn Actor and creating a single door, locally. But the client also receives, via replication, the door that the server created. Therefore, the clients ends up with 2 doors: one received from the server, and one it created locally.
So you probably just have to add a check for Authority, before spawning the door.
Wow. I could have sworn I did that, but you were 100% right. Thanks!