I am creating a fighting game in which the player will grab another character and play it on the floor, but I’m trying to do and the animation is not performed. Could someone show me what I’m doing wrong?
Below is a snippet of code where I try to run the animation:
void OnCollisionEnter(Collision collision) {
if (collision.gameObject.name == "Player") {
if(animation.IsPlaying("attack1")){
animation.Play ("drop");
}
}
}
Thank you!