- Home /
2D Skeleton Animation
Is it possible in Unity2D, to without any 3rd party add ons, create a 2D Skeleton animation? If so, are their any resources on this?
If a 3rd party tool is required, which ones are free? I don't seem to find anything related to Unity2D and Skeleton Animations but a few expencive programs and some people who managed to do it without said tools.
Answer by Spinnernicholas · Dec 03, 2013 at 09:41 PM
There is no explicit 2D skeletal animation built in to Unity Currently(4.3). But, you can do basically the same thing using the Transform Hierarchy.
You would setup a gameobject hierarchy in the same way you would create a bone hierarchy. When an object is rotated/scaled, all children will rotate/scale around the local (0,0). This is like the starting point of each bone.
Then you would add an animator object to the top-most parent object. Finally, you can create your animations.
For a very basic example, say I have a character made up of two halfs. A top and a bottom. I want to simulate a skeleton where the is a bone attaching the top to the bottom with a rotation point where they intersect. This is what I would do:
Note: Unless otherwise stated, all transform positions are (0,0,0)
Create Top-$$anonymous$$ost Parent GameObject
Create and Add Bottom Half GameObject to top-most.
Create and Add Sprite to Bottom Half GameObject.
$$anonymous$$ove Sprite so desired rotation point is at (0,0,0).
Create and Add Top Half GameObject to Bottom Half GameObject.
Create and Add Sprite to Top Half GameObject.
$$anonymous$$ove Sprite so desired rotation point is at (0,0,0).
$$anonymous$$ove Top Half GameObject to desired rotation point relative to Bottom Half GameObject.
Tada!
If it makes it easier to understand, you can name the Bottom Half GameObject BottomBone and the Top Half GameObject TopBone. Na$$anonymous$$g is up to you.
For the best 2D animation tools, take a look at Spriter.
You should be able to export the animations into some intermediate format and then import them into Unity using a script.
Your answer
Follow this Question
Related Questions
Unity 2D animation layers stop other animation layers. 0 Answers
how to make 2D sprites skeletal Movements 1 Answer
Spine animation: how to use a skeleton from a project to transfer to a new project in Spine? 1 Answer
Basic Rotation Animation in Z Axis is Making Really Weird Moves 2 Answers
2D Animation does not start 1 Answer