Created
June 7, 2018 15:26
-
-
Save maco1028/f330b0f79ce7fa43867d0c82a7b2070d to your computer and use it in GitHub Desktop.
ブレンドシェイプアニメーション #unity
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public SkinnedMeshRenderer skinnedMeshRenderer; | |
void Start () { | |
skinnedMeshRenderer = GetComponent<SkinnedMeshRenderer> (); | |
} | |
void Update () { | |
float value = 50.0f + 50.0f * Mathf.Sin (Time.time); | |
skinnedMeshRenderer.SetBlendShapeWeight (0, value); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment