- Home /
Question by
imdekingg · Sep 28, 2012 at 06:14 AM ·
animationjavascriptlevel
How can i make an Animation occur at a certain point in my game
In my game I need it that when I go on the sparks (as in end level) that an animation will occur then make me go to another level. Is this possible or will I have to do it another way. :D
Comment
Answer by HeavyPepper · Sep 28, 2012 at 07:23 AM
If your player has a Rigidbody component attached then try creating an empty game object with a box collider or add a collider to your "sparks" object. Set it "As Trigger" so you can then script an event to occur once your player enters the collider.
function OnTriggerEnter (other : Collider) {
Do Animation Script
}
Your answer
Follow this Question
Related Questions
Using animations in prefabs 1 Answer
How do I animate a 2D sprite? 1 Answer
Expecting EOF found else?? 1 Answer
Attack While Running 1 Answer
walk animation script 1 Answer