bone setup corrections

This commit is contained in:
devZoGok
2022-03-11 07:57:01 +02:00
parent 8936266dcb
commit ff44ad178d
6 changed files with 32 additions and 3 deletions
+6
View File
@@ -17,11 +17,17 @@ namespace vb01{
void Bone::updateBoneInfo(){
for(int i = 0; i < 3; i++)
this->initAxis[i] = globalAxis[i];
restPos = pos;
restRot = orientation;
restScale = scale;
}
void Bone::onAttached(){
Node::onAttached();
updateBoneInfo();
}
Vector3 Bone::getBoneSpaceRestPos(Bone *bone){
Bone *rootBone = skeleton->getRootBone();
Vector3 modelSpacePos = Vector3::VEC_ZERO;