Initial commit

added hip tracking support.
Independent from waist.
Has a hip length value going from waist to hip.
Legs depend on hip instead of waist
should work normally without hip tracker.
Should work just fine with a virtual waist offset.
This commit is contained in:
Louka committed 2021-11-20 00:04:33 -05:00
1 parent e56d7665ed
commit e19cec4d3e
4 files changed
+50 -10

No files matched your search

@@ -111,10 +111,10 @@ public class HumanSkeletonWithLegs extends HumanSkeletonWithWaist {
//extendedPelvisModel = server.config.getBoolean("body.model.extendedPelvis", extendedPelvisModel);
extendedKneeModel = server.config.getBoolean("body.model.extendedKnee", extendedKneeModel);
waistNode.attachChild(leftHipNode);
hipNode.attachChild(leftHipNode);
leftHipNode.localTransform.setTranslation(-hipsWidth / 2, 0, 0);
waistNode.attachChild(rightHipNode);
hipNode.attachChild(rightHipNode);
rightHipNode.localTransform.setTranslation(hipsWidth / 2, 0, 0);
leftHipNode.attachChild(leftKneeNode);
@@ -290,7 +290,7 @@ public class HumanSkeletonWithLegs extends HumanSkeletonWithWaist {
kneeBuf.nlerp(hipBuf, 0.5f);
chestNode.localTransform.getRotation(hipBuf);
kneeBuf.nlerp(hipBuf, 0.3333333f);
waistNode.localTransform.setRotation(kneeBuf);
hipNode.localTransform.setRotation(kneeBuf);
// TODO : Use vectors to add like 50% of wasit tracker yaw to waist node to reduce drift and let user take weird poses
// TODO Set virtual waist node yaw to that of waist node
}