Search Unity

AR Foundation, Multiplayer object Spawn

Discussion in 'AR' started by Aalexander_damanscos, Jan 25, 2020.

  1. Aalexander_damanscos

    Aalexander_damanscos

    Joined:
    Oct 3, 2019
    Posts:
    1
    Hi all, need help for a little project for a job interwiev.
    They ask me to make, with Ar foundation and UNET( it's deprecated, we know, but is just an entry level prjct) on android.
    THat's what I have to achieve:
    Track horizontal plane(done).
    Spawn an object on touch(done).
    With unitY multiplayer, the first device became host, others ar clients. When the host span a object on the tracked plane, clients see the spawned object in the same location, and whaen the host make it turn, clients see it turning. Position and rotation of the object must be the same for everyone, so clients can't call an internal function that make object turn locally.

    Now, my problem is to spawn the object in the same position and rotation for every clients. I've read lot's of discussions on other forums, but I don't understand what I need. How unity track real world position of objects? If I spawn a cube on the center of a table, how can I tell other devices" hey, in this location theres something, make it appear?
    Thanks all for help ^^

    Good Day( or night)