Hello Everyone,
I am trying to make a game in which there are 2 cars translating towards each other and i want to show an animation(Light explosion) on collision.
I have written the following script:
function OnCollisionEnter(collision:Collision)
{
if(collision.gameObject.name == "car2")
{
//Play animation
animation.Play("Light explosion");
}
}
I have attached my script to game object.But animation doesn’t seem to work.Any idea???