How do you run the next animation in a sequence, each time you enter OnTriggerStay on the same object?

Hey :slight_smile:
I hope this is not too confusing but i try to explain as much as possible, this is for a VR project.

For our school project, we need to make some kind of sequence of animations. there is one box for start. its on the top right of the model. the box itself is a trigger area (trigger zone) which means each time the hand object of our model enters the box, it will run OnTriggerStay… now since this has to be some kind of fun excercise, we made the box move downwards. The problem now is each time you enter this box (also after the animation is done and the box is as its new position) it will retrigger… thats some kind of a bug we dont know how to get rid of. The code we wrote itself sits in the OnTriggerStay function, so it makes sense that it reruns as soon as the hand is in the box… but what we actually want is that this box from the position on the bottom now moves to the next location, when you put the hand in, not rerun the previous animation, but the next.

TLDR: You enter your hand into the box, box moves downwards to new location, should stay there and not retrigger animation when you put hand in again.
This is the ultimate goal:

void OnTriggerStay (Collider other) {

//Play animation once 
this.GetComponent<Animation>().Play()

//PLay this after first animation ended (or on second trigger)
this.GetComponent<Animation>().Play()
}

is your animation set to looping or default or Once? I would be more specific about WHAT collider - just so nothing else but the hand is triggering the animation. But it also looks like you are playing the same animation. Name the animations and then call them as needed animation.Play(“firstanim”);