mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 04:23:33 +02:00
commit
742288c583
2 changed files with 9 additions and 8 deletions
|
@ -65,11 +65,6 @@ std::shared_ptr<Avatar> AvatarActionHold::getTarget(glm::quat& rotation, glm::ve
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isRightHand) {
|
|
||||||
static const glm::quat yFlip = glm::angleAxis(PI, Vectors::UNIT_Y);
|
|
||||||
palmRotation *= yFlip; // Match right hand frame of reference
|
|
||||||
}
|
|
||||||
|
|
||||||
rotation = palmRotation * _relativeRotation;
|
rotation = palmRotation * _relativeRotation;
|
||||||
position = palmPosition + rotation * _relativePosition;
|
position = palmPosition + rotation * _relativePosition;
|
||||||
});
|
});
|
||||||
|
@ -218,14 +213,20 @@ bool AvatarActionHold::updateArguments(QVariantMap arguments) {
|
||||||
ok = true;
|
ok = true;
|
||||||
kinematic = EntityActionInterface::extractBooleanArgument("hold", arguments, "kinematic", ok, false);
|
kinematic = EntityActionInterface::extractBooleanArgument("hold", arguments, "kinematic", ok, false);
|
||||||
if (!ok) {
|
if (!ok) {
|
||||||
_kinematic = false;
|
kinematic = _kinematic;
|
||||||
}
|
}
|
||||||
|
|
||||||
ok = true;
|
ok = true;
|
||||||
kinematicSetVelocity = EntityActionInterface::extractBooleanArgument("hold", arguments,
|
kinematicSetVelocity = EntityActionInterface::extractBooleanArgument("hold", arguments,
|
||||||
"kinematicSetVelocity", ok, false);
|
"kinematicSetVelocity", ok, false);
|
||||||
if (!ok) {
|
if (!ok) {
|
||||||
_kinematicSetVelocity = false;
|
kinematicSetVelocity = _kinematicSetVelocity;
|
||||||
|
}
|
||||||
|
|
||||||
|
ok = true;
|
||||||
|
ignoreIK = EntityActionInterface::extractBooleanArgument("hold", arguments, "ignoreIK", ok, false);
|
||||||
|
if (!ok) {
|
||||||
|
ignoreIK = _ignoreIK;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (somethingChanged ||
|
if (somethingChanged ||
|
||||||
|
|
|
@ -50,7 +50,7 @@ private:
|
||||||
bool _kinematic { false };
|
bool _kinematic { false };
|
||||||
bool _kinematicSetVelocity { false };
|
bool _kinematicSetVelocity { false };
|
||||||
bool _previousSet { false };
|
bool _previousSet { false };
|
||||||
bool _ignoreIK { true };
|
bool _ignoreIK { false };
|
||||||
glm::vec3 _previousPositionalTarget;
|
glm::vec3 _previousPositionalTarget;
|
||||||
glm::quat _previousRotationalTarget;
|
glm::quat _previousRotationalTarget;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue