mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-05-08 01:38:20 +02:00
update lasers when distance-scrolling a web entity/overlay
This commit is contained in:
parent
0c06832be4
commit
c93d83dadd
1 changed files with 8 additions and 1 deletions
|
@ -2728,13 +2728,17 @@ function MyController(hand) {
|
||||||
var POINTER_PRESS_TO_MOVE_DELAY = 0.15; // seconds
|
var POINTER_PRESS_TO_MOVE_DELAY = 0.15; // seconds
|
||||||
var POINTER_PRESS_TO_MOVE_DEADSPOT_ANGLE = 0.05; // radians ~ 3 degrees
|
var POINTER_PRESS_TO_MOVE_DEADSPOT_ANGLE = 0.05; // radians ~ 3 degrees
|
||||||
if (this.deadspotExpired || this.touchingEnterTimer > POINTER_PRESS_TO_MOVE_DELAY ||
|
if (this.deadspotExpired || this.touchingEnterTimer > POINTER_PRESS_TO_MOVE_DELAY ||
|
||||||
angleBetween(pointerEvent.direction, this.touchingEnterPointerEvent.direction) > POINTER_PRESS_TO_MOVE_DEADSPOT_ANGLE) {
|
angleBetween(pointerEvent.direction,
|
||||||
|
this.touchingEnterPointerEvent.direction) > POINTER_PRESS_TO_MOVE_DEADSPOT_ANGLE) {
|
||||||
Entities.sendMouseMoveOnEntity(this.grabbedEntity, pointerEvent);
|
Entities.sendMouseMoveOnEntity(this.grabbedEntity, pointerEvent);
|
||||||
Entities.sendHoldingClickOnEntity(this.grabbedEntity, pointerEvent);
|
Entities.sendHoldingClickOnEntity(this.grabbedEntity, pointerEvent);
|
||||||
this.deadspotExpired = true;
|
this.deadspotExpired = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.intersectionDistance = intersectInfo.distance;
|
this.intersectionDistance = intersectInfo.distance;
|
||||||
|
if (this.state == STATE_ENTITY_LASER_TOUCHING) {
|
||||||
|
this.searchIndicatorOn(intersectInfo.searchRay);
|
||||||
|
}
|
||||||
Reticle.setVisible(false);
|
Reticle.setVisible(false);
|
||||||
} else {
|
} else {
|
||||||
this.setState(STATE_OFF, "grabbed entity was destroyed");
|
this.setState(STATE_OFF, "grabbed entity was destroyed");
|
||||||
|
@ -2845,6 +2849,9 @@ function MyController(hand) {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.intersectionDistance = intersectInfo.distance;
|
this.intersectionDistance = intersectInfo.distance;
|
||||||
|
if (this.state == STATE_OVERLAY_LASER_TOUCHING) {
|
||||||
|
this.searchIndicatorOn(intersectInfo.searchRay);
|
||||||
|
}
|
||||||
Reticle.setVisible(false);
|
Reticle.setVisible(false);
|
||||||
} else {
|
} else {
|
||||||
this.setState(STATE_OFF, "grabbed overlay was destroyed");
|
this.setState(STATE_OFF, "grabbed overlay was destroyed");
|
||||||
|
|
Loading…
Reference in a new issue