- Home /
Ultimate Attack Animation
Hello unity3D.I have a question about collision.How can i make it that when my character throw a certain weapon at the opponent my character can do his/her ultimate attack animation?For example.My character throws a sword at the opponent and if the sword touches the opponent,my character is suppose to do a certain sequence of animations.If anyone knows how i can do this?Can you please tell me how?
P.S heres another example of what i want link text
Answer by FortisVenaliter · May 22, 2015 at 04:20 PM
Here's one way to do it. I'll lay out the basic steps and leave the coding to you:
Have the sword store a reference to it's owner, and give it a collider.
In it's OnCollisionEnter function, check if it collided with the enemy.
If it does, use it's reference to it's owner player to call a function to kick off the animation.
But the Problem is when the sword hit the opponent the sword explodes and therefore the sword is not on the field thats why my character can't finish the animation sequence because of the fact that the sword at the animation script.
Does the sword have to destroy then? Couldn't you turn the renderer off until the animation is complete, then destroy it?
Your Right i should have not make the sword destroy itself until AFTER i finish the ultimate move