Esempio n. 1
0
    // Sends local player position
    private void SendPosition()
    {
        var tr = localPlayerInstance.transform;

        var posData = new PositionData
        {
            ID        = PhotonNetwork.LocalPlayer.ActorNumber,
            Position  = tr.position,
            YRotation = tr.rotation.eulerAngles.y,
        };

        RaiseEvent(EventCode.Movement, posData.ToObjectArray());
    }