Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by latamakuchi · Jan 22, 2014 at 10:59 PM · animation2dunity 4.3

Is there something like a 2d equivalent to the avatar body mask? / Any way to create an animation for an arm attacking that's independent from the body (in 2d)?

Hi there! I'm new to Unity, so I apologize in advance if this question is a bit stupid and the answer obvious.

I'm trying to make a simple fighting game in 2d, using the recently launched native 2d tools. The game uses a classic side view and the characters are made of different parts instead of being just one sprite (think cutout animations). Basically they're head + body and legs + arm holding a sword, stacked in that order and parented to a gameobject.

What I want to know is if there's a way to animate body and arm separately. Is there something like a 2d equivalent to the avatar body mask that exists for 3d? I just want to have the arm in one "layer" and the rest of the body in a different one, so I can create idle and an attacking animations for the arm that are independent from the body, and have the character/body have its own idle, running and jumping animations.

In other words, what I'm asking is if there's a way to make the character attack (swing a sword) while standing still, running or jumping without having to make whole body animations for each combination (running and attacking, jumping and attacking and standing and attacking).

I hope the question was clear enough (english is not my first language), and thanks in advance for any help you could provide!

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

3 Replies

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by Vitor_r · Jan 23, 2014 at 11:06 AM

There is a way, take a look at the Unity 2d Tutorial here and pay attention when they are explaining the animation of the cannon... if im not mistaken (i can't check it now because im at work), he uses a Layer for the animation of the cannon so he animates regardless of the body animation.

Comment
Add comment · Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image latamakuchi · Jan 23, 2014 at 02:28 PM 0
Share

Thank you so much! I think I remember watching at least part of that tutorial when it came out, but I completely missed/forgot about that part!

avatar image ArchAngelus · Jul 22, 2014 at 02:17 AM 3
Share

For those wondering, he mentions the animation layer for the bazooka at 10:48 in the video.

avatar image hanisherif1997_unity · May 15, 2021 at 10:02 AM 0
Share

looks like the link is not working. Could someone please give me the link of the video that he is talking about?

avatar image latamakuchi hanisherif1997_unity · May 15, 2021 at 11:47 AM 0
Share

The video was the Unity 4.3 - 2D Game Development Walkthrough, here: https://youtu.be/4qE8cuHI93c

avatar image
2

Answer by Arxot · Apr 17, 2020 at 03:19 PM

I'm interested too! Any new about it in 2020?:) What I would need to is to set up a proper rig 2D model with IK. In order to be able to use OnAnimatorIK() method and manipulate animations in runtime.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image latamakuchi · May 14, 2020 at 11:53 AM 0
Share

There's the 2D IK package https://docs.unity3d.com/Packages/com.unity.2d.ik@3.0/manual/index.html It's in preview like half the packages, and not exactly what you ask for, but could be useful depending on your needs.

avatar image monrrah · Nov 01, 2021 at 01:00 AM 0
Share

com toda certeza a resposta do que ele queria está aqui> com certeza a resposta ao que ele queria está aqui>

https://docs.unity3d.com/Manual/AnimationLayers.html

avatar image
1

Answer by yotam541 · Apr 16, 2020 at 06:57 PM

Is there a solution? The video that @Vitor_r gave does not say anything about it

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image latamakuchi · May 15, 2021 at 11:52 AM 0
Share

The link no longer points to the original video, see my reply to hanisherif above for the right link.

avatar image monrrah · Nov 01, 2021 at 01:00 AM 0
Share

com toda certeza a resposta do que ele queria está aqui> com certeza a resposta ao que ele queria está aqui>

https://docs.unity3d.com/Manual/AnimationLayers.html

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

23 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

2D Animation does not start 1 Answer

Root motion lost in transitions 1 Answer

Animation plays in preview mode but not max screen? 1 Answer

Animation stops rotation 0 Answers

2D (Movement and Animation) overlaps physics with RigidBody2D 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges