Hey everyone,
just a small problem, been searching for why this isnt working. I want the object to play its animations when the object is clicked.
I have this, but it doesnt play when i click it, not sure where to go with this?
#pragma strict
function OnTriggerEnter(theObject : Collider){
if(theObject.gameObject.name=="3rd Person Controller") {
animation.Play("Take001");
}
}
function OnMouseDown () {
animation.Play("Take001");
}