to fall on the plane…(i also added rigidbody to sphere and has enabled use gravity…but still sphere only rotates and do not fall on plane)…
plz look at my code
var theprefab:GameObject;
var siddhesh:boolean = false;
function Update () {
if (siddhesh==false)
{
Instantiate (theprefab,transform.position,transform.rotation);
siddhesh=true;
}
}
now my prefab(sphere )is falling down on plane …now as soon as it falls on plane i want it to move in staright direction so i have used transform.translate…but still its not working…wht should i use in order to move sphere (my prefab)…here is code…
var theprefab:GameObject;
var siddhesh:boolean = false;
var speed :float= 5.0;
function Update () {
if (siddhesh==false)
{
Instantiate (theprefab,transform.position,transform.rotation);
siddhesh=true;
}