Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Only the server is able to update moved objects for clients

Discussion in 'Multiplayer' started by MarcoMeter, Jun 23, 2014.

  1. MarcoMeter

    MarcoMeter

    Joined:
    Jun 14, 2013
    Posts:
    69
    Hello,

    I'm developing a network based game where 4 players are located in 4 different rooms on their own. The goal is to escape this room by solving puzzles. Each player has certain objects located in his room. Those objects can be sent to another room.

    The problem is that only the player, who is server, is able to synchronize sent objects. If a client sends an object, there isn't an update on the server as well as on the other clients.


    The gameObjects, which are supposed to be sent, have a NetworkView attached to them which observes the Transform component.


    Each player hast this PickUp component attached to them:




    I already tried to synchronize the new position (after sending) via an RPC. I tried Network.Instantiate on the mentioned sendable objects as well.


    I hope that someone of you could provide me some hints to solve this problem.




    Solution has been found:

    It's about the ownership of ewach networkview. I allocate a new id on the interacted gameobject and then update this id via rpc.
     
    Last edited: Jun 23, 2014
  2. tomaz52

    tomaz52

    Joined:
    Feb 12, 2014
    Posts:
    22
    hello, i'm having the same issue, can you be more specific on how to allocate a new id on the interacted gameobject?