- Home /
How to detect for collisions and run scripts on other objects during specific animation frames?
I've set up a walking animation so that it plays a giant mech footstep sound effect when it hits the ground in that animation event. I also have a box collider around the feet set as a trigger so it can crush enemies and cars while walking. Only, I can't figure out how to make that trigger -only- during the frames where it looks like the animation is stepping down, and it instead does it all the time.
Answer by senad · Mar 01, 2012 at 09:15 AM
Can you activate/deactivate the collider depending on animation time?
I tried that and thought I got it working, but I guess it's a false alarm. It doesn't seem to work right. The Box Collision isn't turning on and off.
Oh, that made it work. :) Now if I could just keep the mech from "climbing" other objects like stairs during collisions, it'd work perfectly fine! And changing other object's Y scales seems to make them vanish under the ground... I'll be needing a solution for that also, apparently. :\