mirror of
https://github.com/lubosz/overte.git
synced 2025-04-23 12:14:00 +02:00
Fix grab behavior
This commit is contained in:
parent
353fe774ca
commit
fc77d6cd40
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;
|
||||
position = palmPosition + rotation * _relativePosition;
|
||||
});
|
||||
|
@ -218,14 +213,20 @@ bool AvatarActionHold::updateArguments(QVariantMap arguments) {
|
|||
ok = true;
|
||||
kinematic = EntityActionInterface::extractBooleanArgument("hold", arguments, "kinematic", ok, false);
|
||||
if (!ok) {
|
||||
_kinematic = false;
|
||||
kinematic = _kinematic;
|
||||
}
|
||||
|
||||
ok = true;
|
||||
kinematicSetVelocity = EntityActionInterface::extractBooleanArgument("hold", arguments,
|
||||
"kinematicSetVelocity", ok, false);
|
||||
if (!ok) {
|
||||
_kinematicSetVelocity = false;
|
||||
kinematicSetVelocity = _kinematicSetVelocity;
|
||||
}
|
||||
|
||||
ok = true;
|
||||
ignoreIK = EntityActionInterface::extractBooleanArgument("hold", arguments, "ignoreIK", ok, false);
|
||||
if (!ok) {
|
||||
ignoreIK = _ignoreIK;
|
||||
}
|
||||
|
||||
if (somethingChanged ||
|
||||
|
|
|
@ -50,7 +50,7 @@ private:
|
|||
bool _kinematic { false };
|
||||
bool _kinematicSetVelocity { false };
|
||||
bool _previousSet { false };
|
||||
bool _ignoreIK { true };
|
||||
bool _ignoreIK { false };
|
||||
glm::vec3 _previousPositionalTarget;
|
||||
glm::quat _previousRotationalTarget;
|
||||
|
||||
|
|
Loading…
Reference in a new issue