revamped Y axis orientation method

assignment of animated model bone axis
pose orientaion axis retrieved from bone axis
This commit is contained in:
devZoGok
2021-10-19 19:06:41 +03:00
parent a09a4f548a
commit 66f3adfb4e
6 changed files with 53 additions and 33 deletions
+1 -12
View File
@@ -9,7 +9,7 @@ namespace vb01{
this->length = length;
}
void Bone::lookAt(Vector3 newDir, Vector3 newUp, Node *par){
void Bone::lookAt(Vector3 newDir, Vector3 newUp){
Node::lookAt(newDir, newUp);
for(int i = 0; i < 3; i++)
this->initAxis[i] = globalAxis[i];
@@ -18,17 +18,6 @@ namespace vb01{
restScale = scale;
}
/*
void Bone::lookAt(Vector3 newDir, Node *par){
Node::lookAt(newDir, par);
for(int i = 0; i < 3; i++)
this->initAxis[i] = globalAxis[i];
restPos = pos;
restRot = orientation;
restScale = scale;
}
*/
Vector3 Bone::getModelSpacePos(){
Vector3 modelSpacePos = Vector3::VEC_ZERO;
Bone *rootBone = skeleton->getRootBone();