please guys help… i do everything i saw in that tutorial video…but this script is not working…please guys help me!!!please!!!
here this code
var rayCastLength = 5;
function update() { var hit : RaycastHit;
//Check if we're colliding
if(Physics.Raycast (transform.position, transform.forward, hit, rayCastLength))
{
//... with the door
if(hit.collider.gameObject.tag == "door")
{
//open the door!
hit.collider.gameObject.animation.Play("door_open");
}
}
please guys help me to found this problem…tnx