Synchronization random movement enemies

Options
Hello ,

I'm new to photon, and now I'm not sure what to do in this case:

When the player 1 enter, there are already in the scene a lot (+100) enemy game objects moving around in a random direction and rotation. When i enter with my player 2 to the scene, because they are moving random the enemies are in a different position and rotation than the player 1.

What i should do to see the enemies in the same position and rotation for all players ?

thanks :)

Comments

  • vadim
    Options
    Hi,

    I suppose you use PUN for that, to make things appear same on different clients. Do you synchronize enemies somehow?
    Note, a lot of synchronized objects is not always good idea since such synchronization may exceed bandwidth limit.
  • Hi,

    yes I use PUN for unity 5

    I don't have anything to synchronize the enemies, I tried some stuff but didn't work.
    ex.JPG 50.2K
  • vadim
    Options
    What i should do to see the enemies in the same position and rotation for all players ?
    Basically, you need PhotonView attached to every enemy with position synchronized.
    Check Marco Polo tutorial and PUN demos for details on this synchronization.
  • If I do that they teleports position all time
  • Tobias
    Options
    Which component do you use and observe?
    If you observe the Transform of the GameObject, then teleporting is the norm, because there are just the updates and no smoothing.
    Use a PhotonTransformView.
  • I tried as well and it's more or less the same