Parameter Manipulation in Cubism SDK for Cocos Creator

Updated: 03/14/2023

This page is for Cubism version 4.2 or earlier. Click here for the latest version.

When manipulating the values of model parameters in Cubism SDK for Cocos Creator, it is necessary to do so at the timing of Component.lateUpdate() in Cocos Creator’s event function.

Click here for more information on the order of execution of Cocos Creator’s event functions.

The process of playing the AnimationClip is performed between Component.update() and Component.lateUpdate() in Cocos Creator’s event functions.
If the parameter value is manipulated with Component.update(), it will be overwritten by the value of the AnimationClip that is played immediately after.
Therefore, any manipulation of parameter values should be done after AnimationClip has set the values.

All components included with Cubism SDK for Cocos Creator manipulate parameter values from Component.lateUpdate().

Also, since the model’s vertex update process from the parameter values at each frame is performed in Cocos Creator’s post-draw event (Director.EVENT_AFTER_DRAW), any value manipulation later than this will not be calculated.

Was this article helpful?
Please let us know what you think about this article.