- Home /
Tag set by animation: problem
I need that, when a certain animation is playing, two objects changes their tags into "Melee". This is the lines concerning this i wrote: if(animation.IsPlaying("melee")) { Claw.tag = "Melee"; Claw2.tag = "Melee"; } else { Claw.tag = "Untagged"; Claw2.tag = "Untagged"; }
Into the Update function. It works very fine, but i've another script that says that, in case of collision with an object tagged with "Melee", its Health decreases by 34 and an object is instantiated. But when the animation is running and the tag is set and my "Melee" tagged object collides with the other, nothing happens. Both objects has a sphere collider on them, and all is set right. What have i missed? Thank you!
Your answer
Follow this Question
Related Questions
Collision detection problem 1 Answer
Play annimation on collision not working. 1 Answer
Need help with some OnTrigger Scripting 2 Answers