mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 01:03:57 +02:00
Fix for broken entity scrolling introduced by 23ea65e2
this.grabbedEntity was being cleared before entityTouchingExit transition could send the release event.
This commit is contained in:
parent
fc8b09d2b3
commit
2c3c96b600
1 changed files with 4 additions and 4 deletions
|
@ -2719,6 +2719,8 @@ function MyController(hand) {
|
|||
Entities.sendClickReleaseOnEntity(this.grabbedEntity, pointerEvent);
|
||||
Entities.sendHoverLeaveEntity(this.grabbedEntity, pointerEvent);
|
||||
}
|
||||
this.grabbedEntity = null;
|
||||
this.grabbedOverlay = null;
|
||||
};
|
||||
|
||||
this.entityTouching = function(dt) {
|
||||
|
@ -2728,7 +2730,6 @@ function MyController(hand) {
|
|||
entityPropertiesCache.addEntity(this.grabbedEntity);
|
||||
|
||||
if (this.state == STATE_ENTITY_LASER_TOUCHING && !this.triggerSmoothedGrab()) {
|
||||
this.grabbedEntity = null;
|
||||
this.setState(STATE_OFF, "released trigger");
|
||||
return;
|
||||
}
|
||||
|
@ -2740,7 +2741,6 @@ function MyController(hand) {
|
|||
|
||||
if (this.state == STATE_ENTITY_STYLUS_TOUCHING &&
|
||||
intersectInfo.distance > WEB_STYLUS_LENGTH / 2.0 + WEB_TOUCH_Y_OFFSET) {
|
||||
this.grabbedEntity = null;
|
||||
this.setState(STATE_OFF, "pulled away from web entity");
|
||||
return;
|
||||
}
|
||||
|
@ -2837,19 +2837,19 @@ function MyController(hand) {
|
|||
Overlays.sendMouseReleaseOnOverlay(this.grabbedOverlay, pointerEvent);
|
||||
Overlays.sendHoverLeaveOverlay(this.grabbedOverlay, pointerEvent);
|
||||
}
|
||||
this.grabbedEntity = null;
|
||||
this.grabbedOverlay = null;
|
||||
};
|
||||
|
||||
this.overlayTouching = function (dt) {
|
||||
this.touchingEnterTimer += dt;
|
||||
|
||||
if (this.state == STATE_OVERLAY_STYLUS_TOUCHING && this.triggerSmoothedSqueezed()) {
|
||||
this.grabbedEntity = null;
|
||||
this.setState(STATE_OFF, "trigger squeezed");
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.state == STATE_OVERLAY_LASER_TOUCHING && !this.triggerSmoothedGrab()) {
|
||||
this.grabbedEntity = null;
|
||||
this.setState(STATE_OFF, "released trigger");
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue