Skip to content

Commit

Permalink
Fix rotation and quality
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmfinol committed Apr 28, 2024
1 parent c87c79b commit 25060bd
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 20 deletions.
8 changes: 2 additions & 6 deletions Assets/Scripts/Cgs/CardGameView/Viewer/CardActions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@ public static void Rotate(CardModel cardModel)
return;
}

cardModel.transform.rotation *= Quaternion.Euler(0, 0, -CardGameManager.Current.GameCardRotationDegrees);
if (cardModel.IsOnline)
cardModel.UpdateRotationServerRpc(cardModel.transform.rotation);
cardModel.Rotation *= Quaternion.Euler(0, 0, -CardGameManager.Current.GameCardRotationDegrees);
}

public static void Tap(CardModel cardModel)
Expand All @@ -64,11 +62,9 @@ public static void Tap(CardModel cardModel)
}

var isVertical = cardModel.transform.rotation.Equals(Quaternion.identity);
cardModel.transform.rotation = isVertical
cardModel.Rotation = isVertical
? Quaternion.AngleAxis(CardGameManager.Current.GameCardRotationDegrees, Vector3.back)
: Quaternion.identity;
if (cardModel.IsOnline)
cardModel.UpdateRotationServerRpc(cardModel.transform.rotation);
}

public static void Zoom(CardModel cardModel)
Expand Down
107 changes: 93 additions & 14 deletions ProjectSettings/QualitySettings.asset

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 25060bd

Please sign in to comment.