mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 04:44:11 +02:00
Fix grab position
This commit is contained in:
parent
2c5782e4bb
commit
6827a28807
1 changed files with 2 additions and 1 deletions
|
@ -1680,6 +1680,7 @@ function MyController(hand) {
|
|||
} else if (this.entityIsDistanceGrabbable(rayPickInfo.entityID, handPosition)) {
|
||||
if (this.triggerSmoothedGrab() && !isEditing() && farGrabEnabled && farSearching) {
|
||||
this.grabbedEntity = entity;
|
||||
this.grabbedDistance = rayPickInfo.distance;
|
||||
this.setState(STATE_DISTANCE_HOLDING, "distance hold '" + name + "'");
|
||||
return;
|
||||
} else {
|
||||
|
@ -2006,7 +2007,7 @@ function MyController(hand) {
|
|||
this.currentObjectTime = now;
|
||||
this.currentCameraOrientation = Camera.orientation;
|
||||
|
||||
this.grabRadius = Vec3.distance(this.currentObjectPosition, worldControllerPosition);
|
||||
this.grabRadius = this.grabbedDistance;
|
||||
this.grabRadialVelocity = 0.0;
|
||||
|
||||
// offset between controller vector at the grab radius and the entity position
|
||||
|
|
Loading…
Reference in a new issue