improved bone test

remade IK chain bone orientation method
This commit is contained in:
devZoGok
2021-10-19 19:06:41 +03:00
parent 7111ef24e4
commit b7d9a82eec
7 changed files with 89 additions and 42 deletions
+3
View File
@@ -14,6 +14,7 @@ namespace vb01{
void setPoseRot(Quaternion r);
void setPoseScale(Vector3 s);
void lookAt(Vector3, Vector3);
Vector3 getBoneSpaceRestPos(Bone*);
Vector3 getModelSpacePos();
inline Bone* getIkTarget(){return ikTarget;}
inline void setIkTarget(Bone *target){this->ikTarget = target;}
@@ -32,6 +33,8 @@ namespace vb01{
inline Quaternion getPoseRot(){return poseRot;}
inline Vector3 getPoseScale(){return poseScale;}
private:
void updateBoneInfo();
float length;
Bone *ikTarget = nullptr;
int ikChainLength = -1;