hi all
i have to roll dice in a game…
here is script i have written to roll dice…
var prefab: GameObject;
var obj;
function Update () {
if (Input.GetButtonDown("Fire1"))
{
//Destroy (obj);
obj=Instantiate(prefab, Vector3(Random.Range(0,0),50,Random.Range(0,0)), Random.rotation);
Physics.gravity = Vector3(0, -20.0, 0);
}
}
Please any one tell me how i can determine what is on dice??
Please help me… i am stuck in it…