mirror of
https://github.com/Armored-Dragon/overte.git
synced 2025-03-11 16:13:16 +01:00
Fixing typo and review comments
This commit is contained in:
parent
07c13f4d66
commit
b90af1a1ce
2 changed files with 54 additions and 90 deletions
|
@ -85,46 +85,9 @@ function updateHand(handNum, deltaTime) {
|
|||
}
|
||||
}
|
||||
|
||||
function updateHydra(handNum, deltaTime) {
|
||||
var pose;
|
||||
var handName = "right";
|
||||
if (handNum == LEFT_HAND) {
|
||||
pose = Controller.getPoseValue(Controller.Hardware.Hydra.LeftHand);
|
||||
handName = "left";
|
||||
} else {
|
||||
pose = Controller.getPoseValue(Controller.Hardware.Hydra.RightHand);
|
||||
handName = "right";
|
||||
}
|
||||
|
||||
if (pose.valid) {
|
||||
//print(handName + " hand moving" + JSON.stringify(pose));
|
||||
var wpos = Vec3.sum(MyAvatar.getPosition(), pose.translation);
|
||||
|
||||
Overlays.editOverlay(app.spheres[index(handNum, 0)], {
|
||||
position: pose.translation,
|
||||
visible: true,
|
||||
});
|
||||
/*var vpos = Vec3.sum(Vec3.multiply(10 * deltaTime, pose.velocity), pose.translation);
|
||||
Overlays.editOverlay(app.spheres[index(handNum, 1)], {
|
||||
position: vpos,
|
||||
visible: true,
|
||||
});*/
|
||||
} else {
|
||||
Overlays.editOverlay(app.spheres[index(handNum, 0)], {
|
||||
visible: false
|
||||
});
|
||||
|
||||
Overlays.editOverlay(app.spheres[index(handNum, 1)], {
|
||||
visible: false
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function update(deltaTime) {
|
||||
//updateHand(LEFT_HAND, deltaTime);
|
||||
//updateHand(RIGHT_HAND, deltaTime);
|
||||
updateHydra(LEFT_HAND, deltaTime);
|
||||
updateHydra(RIGHT_HAND, deltaTime);
|
||||
updateHand(LEFT_HAND, deltaTime);
|
||||
updateHand(RIGHT_HAND, deltaTime);
|
||||
}
|
||||
|
||||
function scriptEnding() {
|
||||
|
|
|
@ -40,6 +40,7 @@ public:
|
|||
|
||||
void addInputVariant(QString name, ReadLambda& lambda);
|
||||
|
||||
protected:
|
||||
QVector<NamedReadLambda> _namedReadLambdas;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue