Hello everyone!
I’m making a game which you flip cards.
My camera points at the top showing the cards. When i click on a card that one flips but i want to add a realistic flip effect (smooth rotation of the card object) when the flip happens.
Here is what i tried but it doesn’t work:
public var card_1: GameObject;
card_1 = GameObject.Find("card_1");
function OnMouseDown () {
card_1.transform.Rotate(Vector3(0,0,180) * Time.deltaTime);
}
The js code is attached to the card object.
Any suggestions?
Thanx in advance!