mirror of
https://github.com/devZoGok/vb01.git
synced 2026-08-26 19:43:30 +00:00
beginning of object transform animation
improved exporter
This commit is contained in:
+4
-4
@@ -10,9 +10,10 @@ using namespace std;
|
||||
using namespace glm;
|
||||
|
||||
namespace vb01{
|
||||
Skeleton::Skeleton(string name){
|
||||
Skeleton::Skeleton(AnimationController *controller, string name){
|
||||
this->name = name;
|
||||
controller = new AnimationController(this);
|
||||
this->controller = controller;
|
||||
this->controller->setSkeleton(this);
|
||||
}
|
||||
|
||||
void Skeleton::update(){
|
||||
@@ -42,9 +43,8 @@ namespace vb01{
|
||||
|
||||
Bone **boneChain = getIkBoneChain(ikBone);
|
||||
Vector3 boneIkPos[chainLength];
|
||||
for(int i = chainLength - 1; i >= 0; i--){
|
||||
for(int i = chainLength - 1; i >= 0; i--)
|
||||
boneIkPos[i] = subBase->globalToLocalPosition(boneChain[i]->localToGlobalPosition(Vector3::VEC_ZERO));
|
||||
}
|
||||
|
||||
Vector3 targetPos = subBase->globalToLocalPosition(ikTarget->localToGlobalPosition(Vector3::VEC_ZERO));
|
||||
IkSolver::calculateFabrik(chainLength, boneChain, boneIkPos, targetPos);
|
||||
|
||||
Reference in New Issue
Block a user