I have a rope object that I want to be able to click on and that will cause the rope animation to play which is just it being pulled down and then I have another two cubes acting as curtains which I want to open. So I have two animation, one for each, for them being pulled to the sides and then back together.
So to just test that I had a good idea of what to do I just did a basic test of trying to click on the rope and just getting one cube to move. For that I wrote
function OnTriggerEnter(other : Collider){
if (Input.GetKey("Mouse1")){
GameObject.Find("Curtain").animation.Play("CurtainClose");
}
}
But nothing happens for this. Clicking on the rope does nothing. Also not sure when I figure that out how to play multiple animations from the single clip. Would I just add && and continue to list the other two animations?
Thanks for any and all help!