don't reset local offset during a hold

This commit is contained in:
Seth Alves 2016-04-01 17:22:20 -07:00
parent d9f5a0ccaf
commit 9942a5edd4

View file

@ -1437,7 +1437,7 @@ function MyController(hand) {
var currentObjectPosition = grabbedProperties.position;
var offset = Vec3.subtract(currentObjectPosition, handPosition);
this.offsetPosition = Vec3.multiplyQbyV(Quat.inverse(Quat.multiply(handRotation, this.offsetRotation)), offset);
if (this.temporaryPositionOffset && (this.state == STATE_EQUIP || this.state == STATE_HOLD)) {
if (this.temporaryPositionOffset && (this.state == STATE_EQUIP)) {
this.offsetPosition = this.temporaryPositionOffset;
// hasPresetPosition = true;
}