Cubism SDK‎ > ‎Frameworks‎ > ‎

Animation of Breath

Summary

In the sample, we created the animation to be natural by changing the Motion Parameters of the movements like breath periodically even when there is no motion.
It can be mounted easily, since this animation uses simple functions.

Example

It uses the sine wave (the value which changes from -1 to 1 periodically).
Set the time for "t", and make setting to change the parameter value of PARAM_BREATH from 0 to 1.
The value is "3.2345" which is randomly set after the decimal point, to make the sine wave period different from other parameters.
In the sample, it is set after playing the motion. In this case, the value set for the motion will be ignored.

live2DModel.setParamFloat("PARAM_BREATH", (float) (0.5f + 0.5f * Math.sin( t/3.2345 )),1);







Comments