3
0
Fork 0
mirror of https://github.com/lubosz/overte.git synced 2025-04-27 09:55:45 +02:00

Fix for close grab jumping

This commit is contained in:
ericrius1 2016-01-06 15:10:53 -08:00
parent 67f4c250fd
commit 1f6e45d135

View file

@ -1370,7 +1370,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) {
if (this.temporaryPositionOffset && this.state != STATE_NEAR_GRABBING) {
this.offsetPosition = this.temporaryPositionOffset;
}
}