Merge branch 'master' into gltf_mesh_morph_animations

pull/2675/head
vcebollada 2019-09-25 16:16:32 +01:00 committed by GitHub
commit 8ca39ade6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1038,7 +1038,7 @@ aiNodeAnim* CreateNodeAnim(glTF2::Asset& r, Node& node, AnimationSamplers& sampl
delete[] values; delete[] values;
} else if (node.translation.isPresent) { } else if (node.translation.isPresent) {
anim->mNumPositionKeys = 1; anim->mNumPositionKeys = 1;
anim->mPositionKeys = new aiVectorKey(); anim->mPositionKeys = new aiVectorKey[anim->mNumPositionKeys];
anim->mPositionKeys->mTime = 0.f; anim->mPositionKeys->mTime = 0.f;
anim->mPositionKeys->mValue.x = node.translation.value[0]; anim->mPositionKeys->mValue.x = node.translation.value[0];
anim->mPositionKeys->mValue.y = node.translation.value[1]; anim->mPositionKeys->mValue.y = node.translation.value[1];