fix far-grab initial rotation and entity-method call

This commit is contained in:
Seth Alves 2018-12-14 15:20:32 -08:00
parent 613f290226
commit 9bf9e379a3
2 changed files with 2 additions and 2 deletions

View file

@ -72,7 +72,7 @@ bool ObjectActionTractor::getTarget(float deltaTimeStep, glm::quat& rotation, gl
angularTimeScale = FLT_MAX;
return false;
}
rotation = _desiredRotationalTarget * otherWorldOrientation;
rotation = otherWorldOrientation * _desiredRotationalTarget;
position = otherWorldOrientation * _desiredPositionalTarget + otherWorldPosition;
} else {
// we should have an "other" but can't find it, or its collision shape isn't loaded,

View file

@ -146,7 +146,7 @@ Script.include("/~/system/libraries/controllers.js");
MyAvatar.setJointRotation(FAR_GRAB_JOINTS[this.hand], { x: 0, y: 0, z: 0, w: 1 });
var args = [this.hand === RIGHT_HAND ? "right" : "left", MyAvatar.sessionUUID];
Entities.callEntityMethod(targetProps.id, "startNearGrab", args);
Entities.callEntityMethod(targetProps.id, "startDistanceGrab", args);
this.targetEntityID = targetProps.id;