Search Unity

Position of other Player

Discussion in 'Multiplayer' started by Clyon, Jan 15, 2020.

  1. Clyon

    Clyon

    Joined:
    Aug 14, 2019
    Posts:
    27
    Hey, i am making a simple 2D multiplayer game with photon, where 2 people are fighting. When Player A presses "E" a Meteor should be created with the X coordinate of Player B. So my question is: what would be a good way to get the X coordinate of the other Player?
     
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    I would assume you get a reference to the other player and get the X coordinate with otherPlayerReference.transform.position.x