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; }
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; } }
public static void UpdatePositions(CameraRigContainer container, CameraRigPosition positions) { UpdatePositions(positions, container); }
/// <summary> /// Update other players positions /// </summary> /// <param name="rigPos"></param> public void Receive(CameraRigPosition rigPos) { _otherPlayer = rigPos; _otherPlayerContainer.UpdatePositions(_otherPlayer); }