Cocos2d-x 3.0 Development (vi) creating a skeletal animation with Cocostudio

Source: Internet
Author: User
Tags bind
1. Overview

Now that we've used the static UI controls, let's look at the use of animations.

Effect Diagram:


2. Create a resource layer

Open Cocostudio, this time select "Animationeditor" (the first one) on the initial interface to enter the editor and create a new project: Myanimation.

Add some picture resources to the resource folder so that we can use more elements.

Drag the picture from the assets panel to the render workspace and rename it to: First in the object structure.


Click on the "Figure mode" in the upper left corner, so you can enter animation mode editing.

But when we entered the animation mode, we found that nothing was seen, as if it had not been added. The study found that if the bones are unbound, they cannot be previewed in animation mode. So we're going back to binding bones. Click on "animation mode" to go back to the interface just now. Then I found out that the control I just edited was gone. But the "first" in the object structure is still there. Drag a picture from a resource onto the render resource to display it. There may be a slight problem with the estimate.

3. Create Bones

Click "Create Bone", then click on the element on the workspace, and be careful not to drag.


We will find that an object structure has been created and a Doji star appears in the workspace. We renamed it: Bone1


Click the "Create Bone" button again to switch back to display mode. Next, right click on the picture and select bind to Bone in the popup menu. Then click on the Doji star. Will pop up a hint, I feel this hint is unclear, so, it is estimated that you can not repeat the meaning of adding. Obviously add success, at least also said add success Ah, see "Can't ..." words, make I thought mistaken, checked the long time.




Once the bindings are complete, we will find that the first of the object structures is no longer in the structure and merged into a Bone1. It is visible that the elements that do not bind bones here are not recognized. Hopefully the future version will be able to add a hint when switching modes, which are not bound to bones, and what happens.

We're not busy. Switch mode, then create an element, where the difference is we want to drag the skeleton, and bind:




4. Edit Animation

Click on "shape mode" to switch to "animation mode". Let's first change the default action in the action list to the name: hit. Then make an animation, very simple, similar to flash. Well, the editor is like this:


We can click Play to see the animation effect. 5. Export

In the export project, file---Export the file. This is the default option.

6. Summary

With Cocostudio, it is easy to create animations and export, which greatly simplifies the development and communication costs of art and accelerates the development of the project. Although there are still some details do not perfect, but to everyone has been a great help, I hope you can put a positive attitude to view. After all, its progress also needs our feedback and support.

This blog from the Asura Road, reproduced please indicate the source, prohibited for commercial use: http://blog.csdn.net/fansongy/article/details/12858501



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.