unity anima2d learning notes

this is some learning notes i took from the tutorial:

1.for all sprite, create->anime 2d->mesh
2.for each mesh, edit it if you want. Shift and click an edge to add a vertice at the edge.
3.slice->apply will make a better outline
4.add vertices by double click. at place where is going to have deform
5.put all meshes under one onbject. change layer and depth in layer to show the character correctly.
6.add object bones, in it add object with Bone 2d components.(create->2d->bone will make a bone as a child of current bone). add bone on what is based on what bone rotate will change this bone rotate
7.add bone into mesh->set bones. only left bones that in the mesh. open edit mesh. bind. check overlay to see how bones effect whole mesh. check pies to see how bones effect each vertices. select bone and change weight if you want.
8.add IK limb under bone. put it near hand and add arm bone to it. it will affect 2 bones. may need flip if it look wierd. IK CCD can be used for multiple bones but might not work for leg(that’s for tails and hairs)
9.add animation.add pose manager and add a bind pose(like t pose, what is this for?). then add animator controller. then add animation clip. record and set the position of IKs, then move the hip a little down to make an idle anim. bake the anim so it will bake for all bones and all frames(for complicated anim like walk, you might want to save a pre back version of it so it’s easy to change later.)
10.we can change the gizmo size of IK on the top right conor of scene. we can create a square sprite by create->sprites->square
11.add foot IK as a child of leg IK to make foot anim works( another way is to dis select orient child on leg IK and rotate.)
12.onion skin.to show how player looks in an animation before/after current frame frames(how many frame you want to see) step(how many steps as a skin)
13.walk is hard….might need to take a course about how to make nature walk anim…
14.nature blink 3(close eyes)-2(open eyes)-7(keep opening)

15.since each part of one character is not on the same order in layer, when they overlap, some weird thing might happen. eg: mouse(which is high sort order) of B will be drawn in higher order than A’s face, which B’s face is below A:


how i solve this is kind of stupid.. i use a static value to save the zOffset and keep adding it when create a new one. this might cause a problem when create a lot characters but i’ll solve that when that happens..code looks like this:

static int zOffset;
override protected void Start () {
base.Start ();
foreach (Anima2D.SpriteMeshInstance sr in GetComponentsInChildren<Anima2D.SpriteMeshInstance>()) {
sr.sortingOrder += zOffset;
zOffset += 10;
currentOffset = zOffset;

this is the video,hamster and house used anima2d:

This entry was posted in 未分类. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s