- Home /
Play two 2D animation together?
Hi Unity Community, I am working on a 2D infinite runner/shooter game. I have set up multiple animations using spriter 2D and they all work fine separately in unity. I have a gun fire animation and I want to play the animation with my run/jump animation. I spent two days searching for solution and found out two solutions: 1. Make separate animations for each combination i.e.run&fire, Jump&fire etc 2. Use legacy animation system and use addmixingtransform
Both the solutions seems kind of heavy and lot of rework is required. Is there any better way of doing things here ? do we have any way by which we can mimic avatar mask kind of thing for 2D ?
Answer by rakeshjone · Mar 27, 2016 at 02:12 PM
Thanks for the answer Brullix3000. I have my palyer and gun as separate objects only. But when I press fire key animations didn't mix properly. I found the solution though. :)
I needed to make fire animation with bare minimum keys. in my case just hand and gun and remove all other keys from the fire animation. and keep fire animation on second layer.
Answer by ComradeVanti · Mar 25, 2016 at 10:24 PM
You could make your player and your gun seperate objects. They could have different animators and thus animations.
The gun could still be a child of your player --> it gets moved correctly.
Is that an option? :)
Your answer
Follow this Question
Related Questions
Animation Coordinates Issue 0 Answers
Animation on public transform from script 2D 0 Answers
How to Change to the Same Point in Another Animation 0 Answers
2D elevator with animation doesn't start 0 Answers
Unity2d: Connecting animations 1 Answer