I am a total newb with scripting and unity, so please bear with me. I’m trying to make a memory game where I click on a card and it will turn over, so I’m practicing with a card-like cube, with this script:
function Update () {
if(Input.GetButtonDown("Fire1")) {
transform.rotation = Quaternion.AngleAxis(90, Vector3.up);
}
}
How can I make the card turn 90 degrees every time I click?