card rotation :: Empty with two planes

hi folks!

just playing around with nice unity to get in touch and better knowing each other...

i want to create a dounble sides textured card and want to rotate it by click and tried the following - please tell me from which point on it could be done better - still here to learn from you!

  1. I took one Empty and two Planes as Children of the Empty. Then I added texture and turned one of the planes to face down.

  2. I added a script with a OnMouseDown-Function in it to at least print me into the debug log.

problem: nothing happens, when i click onto the card.

is this because its an empty?how could I do better?


edit: here is the code. just starting to play around...

var rotateSpeed = 250.0;
var rotating = false;

function Start(){}

function Update () 


function OnMouseEnter() 
    Debug.Log( + " OnMouseOver");
    renderer.material.color  =;

function OnMouseUp () 
    rotating = true;

function rotateCard()
    var theRotation = rotateSpeed * Time.deltaTime;
    //if(theRotation <= 0.5){
        transform.Rotate(0.0, 0.0, theRotation); 

Depending on how you implemented the mouse function you may need a collider on the cards but as elbon suggests you should edit some code into your question.