Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Prefab position has the wrong Zero

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

  1. levraimax

    levraimax

    Joined:
    Dec 16, 2021
    Posts:
    1
    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.