Klaidų taisymas eksporteryje bei sprendžiant IK

exporter and IK sollution bugfixes
This commit is contained in:
devZoGok
2021-10-19 19:06:41 +03:00
parent 428d9993c8
commit 13cbfced83
2 changed files with 20 additions and 19 deletions
+12
View File
@@ -16,6 +16,18 @@ namespace vb01{
}
void Skeleton::update(){
for(Bone *b : bones){
if(b->getIkTarget()){
const int chainLength = b->getIkChainLength();
Bone **boneChain = getIkBoneChain(b);
for(int i = 0; i < chainLength; i++){
boneChain[i]->setPosePos(Vector3::VEC_ZERO);
boneChain[i]->setPoseRot(Quaternion::QUAT_W);
boneChain[i]->setPoseScale(Vector3::VEC_IJK);
}
delete[] boneChain;
}
}
for(Bone *b : bones){
if(b->getIkTarget())
solveIk(b);