Search Unity

MLAPI Server Authoritive Movement in Multiple Scenes

Discussion in 'Multiplayer' started by naishtech, Oct 7, 2021.

  1. naishtech

    naishtech

    Joined:
    Sep 21, 2018
    Posts:
    20
    Hello I would like to know if it is possible to maintain P2P server authoritive movement with multiple scenes using the MLAPI, and if so - what is the best approach?

    I've found with my own attempts, when I only load the host into another scene, the clients no longer collide with objects in their own scene, but rather objects in the server scene (which makes sense because it's server authoritive movement).

    so to reiterate

    a) Is the MLAPI designed to do this?

    b) If so, how?

    Any help, much appreciated!
     
  2. ep1s0de

    ep1s0de

    Joined:
    Dec 24, 2015
    Posts:
    168
    It is better to separate the objects with a physical layer

    Client objects will have a Client Entity layer
    Server objects will have a Server Entity layer
    Then, in the settings or code using a mask, eliminate collisions between these layers
     
    naishtech likes this.
  3. naishtech

    naishtech

    Joined:
    Sep 21, 2018
    Posts:
    20
    Awesome, I didn't think of that, thanks @ep1s0de