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

Prefab position has the wrong Zero

Discussion in 'Multiplayer' started by levraimax, Dec 29, 2022.

  1. levraimax


    Dec 16, 2021
    I'm making a card game, I've made zones for the cards to go into and automatically position them. The zones have been working very well in singleplayer. I first tried to implement multiplayer in a straightforward way but I dislike the delay. Instead I use rpcs to sync gamestates.

    To test players loading their decks, I made the host create a card and put it in a zone and when the client joins, an rpc makes the server (host) create another card and add it to the same zone. For some reason the first card has the correct position but with the wrong zero (bottom left instead of center) once the second player connects.
    I've printed the calculated positions in the console, they are correct. I've printed the positions in the setters, they are correct. The first object seems to have the wrong zero and I have no clue why, I've been stuck on this for weeks this is really frustrating.