- Home /
Trouble with Triggering Animation - Please help!!!
Hi, I am trying to get a trigger event to occur in a scene I am creating. I want a boxer to "hit" another boxer and then have that "hit" trigger a reaction from the boxer that was hit. I tried doing this, but to no avail. I have an animation already set called "Upset" for the reaction that the hit boxer will display. It is in my script and attached to the boxer that will be hit. Here's a picture of what I'm trying to do:
Here is my script:
var BerserkerClip : AnimationClip;
function OnTriggerEnter (player: Collider) {
if(player.tag=="CentralPowersPlayer")
GameObject.Find("Mesh_Berserker").GetComponent.<Animation>().Play("Upset");
}
Any ideas on why the boxer who will be hit isn't doing anything? He should be displaying the Upset animation. I have the boxer in red, Boxer 1, swinging at him, and I have a mesh around the boxer who will be hit. I have a Box Collider and it's turned on. I just don't understand why it's not working. What could I be doing wrong? Any help is MUCH appreciated!!
Your answer

Follow this Question
Related Questions
Make Character swim 0 Answers
Android device Timespan error 0 Answers
Enemies not dying and bullet not exploding and particle system not being made. 0 Answers
Could someone explain what is maxDepenetrationVelocity under rigid Body? 1 Answer
First person camera judder with rigidbody based characters 1 Answer