- Home /
How do I create an animation under a player?
Basically, I have an object that the player needs to pick up to pass each level. What I want to do is when the player picks up that object, an animation of raindrops appear under the player, until they finish the level. I have created an animation for the raindrops falling but cannot figure out how to play it. I tried to create a different animator and linked it to a different avatar mask but the animation will not play. I linked it to a script to play the animation when the object is picked up. The main problem I am having is that I need the raindrops to always be playing after the object is picked up but still be able to play different animations on the player (run, jump, etc). If anyone could help me with this it would be highly appreciated. Btw I am creating a 2D platformer if that helps.
Thanks, Toby.
How is it set up? I would recommend having a child gameObject for the raindrops and animation on loop.
transform.GetChild('raindrop's child index number').gameObject.GetComponent<Animator>().Play("animation name");
should work fine.
Answer by Kaziata · Mar 02, 2020 at 04:37 AM
Could you use a particle effect instead of an animation for this?
Your answer
![](https://koobas.hobune.stream/wayback/20220612224224im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How To Mirror Animation 1 Answer
Play and Stop Animation 1 Answer
Can the animation editor create local rotational data? 3 Answers
animation state is stuck 0 Answers
idle > walk > run animation 1 Answer