mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-17 18:58:10 +02:00
Laser on tablet bezel as well as screen and "x" button
This commit is contained in:
parent
67eb282815
commit
936b5f3571
3 changed files with 10 additions and 8 deletions
|
@ -145,11 +145,11 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js");
|
||||||
return deltaTime;
|
return deltaTime;
|
||||||
};
|
};
|
||||||
|
|
||||||
this.setIgnoreTablet = function() {
|
this.setIgnorePointerItems = function() {
|
||||||
if (HMD.tabletID !== this.tabletID) {
|
if (HMD.tabletID !== this.tabletID) {
|
||||||
this.tabletID = HMD.tabletID;
|
this.tabletID = HMD.tabletID;
|
||||||
Pointers.setIgnoreItems(_this.leftPointer, _this.blacklist.concat([HMD.tabletID]));
|
Pointers.setIgnoreItems(_this.leftPointer, _this.blacklist);
|
||||||
Pointers.setIgnoreItems(_this.rightPointer, _this.blacklist.concat([HMD.tabletID]));
|
Pointers.setIgnoreItems(_this.rightPointer, _this.blacklist);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -168,7 +168,7 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js");
|
||||||
}
|
}
|
||||||
var sensorScaleFactor = MyAvatar.sensorToWorldScale;
|
var sensorScaleFactor = MyAvatar.sensorToWorldScale;
|
||||||
var deltaTime = _this.updateTimings();
|
var deltaTime = _this.updateTimings();
|
||||||
_this.setIgnoreTablet();
|
_this.setIgnorePointerItems();
|
||||||
|
|
||||||
if (controllerDispatcherPluginsNeedSort) {
|
if (controllerDispatcherPluginsNeedSort) {
|
||||||
_this.orderedPluginNames = [];
|
_this.orderedPluginNames = [];
|
||||||
|
@ -388,8 +388,8 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js");
|
||||||
};
|
};
|
||||||
|
|
||||||
this.setBlacklist = function() {
|
this.setBlacklist = function() {
|
||||||
RayPick.setIgnoreItems(_this.leftControllerRayPick, this.blacklist.concat(HMD.tabletID));
|
RayPick.setIgnoreItems(_this.leftControllerRayPick, this.blacklist);
|
||||||
RayPick.setIgnoreItems(_this.rightControllerRayPick, this.blacklist.concat(HMD.tabletID));
|
RayPick.setIgnoreItems(_this.rightControllerRayPick, this.blacklist);
|
||||||
};
|
};
|
||||||
|
|
||||||
var MAPPING_NAME = "com.highfidelity.controllerDispatcher";
|
var MAPPING_NAME = "com.highfidelity.controllerDispatcher";
|
||||||
|
|
|
@ -118,7 +118,8 @@ WebTablet = function (url, width, dpi, hand, clientOnly, location, visible) {
|
||||||
Overlays.deleteOverlay(this.webOverlayID);
|
Overlays.deleteOverlay(this.webOverlayID);
|
||||||
}
|
}
|
||||||
|
|
||||||
var WEB_ENTITY_Z_OFFSET = (tabletDepth / 2.0) / sensorScaleFactor;
|
var RAYPICK_OFFSET = 0.0001; // Sufficient for raypick to reliably intersect tablet screen before tablet model.
|
||||||
|
var WEB_ENTITY_Z_OFFSET = (tabletDepth / 2.0) / sensorScaleFactor + RAYPICK_OFFSET;
|
||||||
var WEB_ENTITY_Y_OFFSET = 0.004;
|
var WEB_ENTITY_Y_OFFSET = 0.004;
|
||||||
var screenWidth = 0.82 * tabletWidth;
|
var screenWidth = 0.82 * tabletWidth;
|
||||||
var screenHeight = 0.81 * tabletHeight;
|
var screenHeight = 0.81 * tabletHeight;
|
||||||
|
|
|
@ -400,7 +400,8 @@ resizeTablet = function (width, newParentJointIndex, sensorToWorldScaleOverride)
|
||||||
});
|
});
|
||||||
|
|
||||||
// update webOverlay
|
// update webOverlay
|
||||||
var WEB_ENTITY_Z_OFFSET = (tabletDepth / 2.0) * sensorScaleOffsetOverride;
|
var RAYPICK_OFFSET = 0.0001; // Sufficient for raypick to reliably intersect tablet screen before tablet model.
|
||||||
|
var WEB_ENTITY_Z_OFFSET = (tabletDepth / 2.0) * sensorScaleOffsetOverride + RAYPICK_OFFSET;
|
||||||
var WEB_ENTITY_Y_OFFSET = 0.004 * sensorScaleFactor * sensorScaleOffsetOverride;
|
var WEB_ENTITY_Y_OFFSET = 0.004 * sensorScaleFactor * sensorScaleOffsetOverride;
|
||||||
var screenWidth = 0.82 * tabletWidth;
|
var screenWidth = 0.82 * tabletWidth;
|
||||||
var screenHeight = 0.81 * tabletHeight;
|
var screenHeight = 0.81 * tabletHeight;
|
||||||
|
|
Loading…
Reference in a new issue