예제 #1
0
        public static void UpdatePositions(CameraRigPosition positions, CameraRigContainer container)
        {
            positions.head.position      = container.head.position;
            positions.leftHand.position  = container.leftHand.position;
            positions.rightHand.position = container.rightHand.position;

            positions.head.rotation      = container.head.rotation;
            positions.leftHand.rotation  = container.leftHand.rotation;
            positions.rightHand.rotation = container.rightHand.rotation;
        }
예제 #2
0
        public void UpdatePositions(CameraRigPosition otherPlayer)
        {
            if (_head != null)
            {
                _head.position = otherPlayer.head.position;
                _head.rotation = otherPlayer.head.rotation;
            }

            if (_leftHand != null)
            {
                _leftHand.position = otherPlayer.leftHand.position;
                _leftHand.rotation = otherPlayer.leftHand.rotation;
            }

            if (_rightHand != null)
            {
                _rightHand.position = otherPlayer.rightHand.position;
                _rightHand.rotation = otherPlayer.rightHand.rotation;
            }
        }
예제 #3
0
 public static void UpdatePositions(CameraRigContainer container, CameraRigPosition positions)
 {
     UpdatePositions(positions, container);
 }
예제 #4
0
 /// <summary>
 /// Update other players positions
 /// </summary>
 /// <param name="rigPos"></param>
 public void Receive(CameraRigPosition rigPos)
 {
     _otherPlayer = rigPos;
     _otherPlayerContainer.UpdatePositions(_otherPlayer);
 }