Skip to content

Instantly share code, notes, and snippets.

@maco1028
Created June 7, 2018 15:26
Show Gist options
  • Save maco1028/f330b0f79ce7fa43867d0c82a7b2070d to your computer and use it in GitHub Desktop.
Save maco1028/f330b0f79ce7fa43867d0c82a7b2070d to your computer and use it in GitHub Desktop.
ブレンドシェイプアニメーション #unity
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