mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01: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.sendClickReleaseOnEntity(this.grabbedEntity, pointerEvent);
|
||||||
Entities.sendHoverLeaveEntity(this.grabbedEntity, pointerEvent);
|
Entities.sendHoverLeaveEntity(this.grabbedEntity, pointerEvent);
|
||||||
}
|
}
|
||||||
|
this.grabbedEntity = null;
|
||||||
|
this.grabbedOverlay = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
this.entityTouching = function(dt) {
|
this.entityTouching = function(dt) {
|
||||||
|
@ -2728,7 +2730,6 @@ function MyController(hand) {
|
||||||
entityPropertiesCache.addEntity(this.grabbedEntity);
|
entityPropertiesCache.addEntity(this.grabbedEntity);
|
||||||
|
|
||||||
if (this.state == STATE_ENTITY_LASER_TOUCHING && !this.triggerSmoothedGrab()) {
|
if (this.state == STATE_ENTITY_LASER_TOUCHING && !this.triggerSmoothedGrab()) {
|
||||||
this.grabbedEntity = null;
|
|
||||||
this.setState(STATE_OFF, "released trigger");
|
this.setState(STATE_OFF, "released trigger");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2740,7 +2741,6 @@ function MyController(hand) {
|
||||||
|
|
||||||
if (this.state == STATE_ENTITY_STYLUS_TOUCHING &&
|
if (this.state == STATE_ENTITY_STYLUS_TOUCHING &&
|
||||||
intersectInfo.distance > WEB_STYLUS_LENGTH / 2.0 + WEB_TOUCH_Y_OFFSET) {
|
intersectInfo.distance > WEB_STYLUS_LENGTH / 2.0 + WEB_TOUCH_Y_OFFSET) {
|
||||||
this.grabbedEntity = null;
|
|
||||||
this.setState(STATE_OFF, "pulled away from web entity");
|
this.setState(STATE_OFF, "pulled away from web entity");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2837,19 +2837,19 @@ function MyController(hand) {
|
||||||
Overlays.sendMouseReleaseOnOverlay(this.grabbedOverlay, pointerEvent);
|
Overlays.sendMouseReleaseOnOverlay(this.grabbedOverlay, pointerEvent);
|
||||||
Overlays.sendHoverLeaveOverlay(this.grabbedOverlay, pointerEvent);
|
Overlays.sendHoverLeaveOverlay(this.grabbedOverlay, pointerEvent);
|
||||||
}
|
}
|
||||||
|
this.grabbedEntity = null;
|
||||||
|
this.grabbedOverlay = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
this.overlayTouching = function (dt) {
|
this.overlayTouching = function (dt) {
|
||||||
this.touchingEnterTimer += dt;
|
this.touchingEnterTimer += dt;
|
||||||
|
|
||||||
if (this.state == STATE_OVERLAY_STYLUS_TOUCHING && this.triggerSmoothedSqueezed()) {
|
if (this.state == STATE_OVERLAY_STYLUS_TOUCHING && this.triggerSmoothedSqueezed()) {
|
||||||
this.grabbedEntity = null;
|
|
||||||
this.setState(STATE_OFF, "trigger squeezed");
|
this.setState(STATE_OFF, "trigger squeezed");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.state == STATE_OVERLAY_LASER_TOUCHING && !this.triggerSmoothedGrab()) {
|
if (this.state == STATE_OVERLAY_LASER_TOUCHING && !this.triggerSmoothedGrab()) {
|
||||||
this.grabbedEntity = null;
|
|
||||||
this.setState(STATE_OFF, "released trigger");
|
this.setState(STATE_OFF, "released trigger");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue