mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-19 13:44:20 +02:00
home button works in desktop mode
This commit is contained in:
parent
672deb903c
commit
58e04f8e35
1 changed files with 5 additions and 2 deletions
|
@ -190,7 +190,7 @@ WebTablet.prototype.getOverlayObject = function () {
|
|||
WebTablet.prototype.destroy = function () {
|
||||
Overlays.deleteOverlay(this.webOverlayID);
|
||||
Entities.deleteEntity(this.tabletEntityID);
|
||||
Overlays.deleteEntity(this.homeButtonEntity);
|
||||
Overlays.deleteOverlay(this.homeButtonEntity);
|
||||
HMD.displayModeChanged.disconnect(this.myOnHmdChanged);
|
||||
|
||||
if (HMD.active) {
|
||||
|
@ -305,7 +305,10 @@ WebTablet.prototype.mousePressEvent = function (event) {
|
|||
var entityPickResults = Entities.findRayIntersection(pickRay, true); // non-accurate picking
|
||||
if (entityPickResults.intersects && entityPickResults.entityID === this.tabletEntityID) {
|
||||
var overlayPickResults = Overlays.findRayIntersection(pickRay);
|
||||
if (!overlayPickResults.intersects || !overlayPickResults.overlayID === this.webOverlayID) {
|
||||
if (overlayPickResults.intersects && overlayPickResults.overlayID === HMD.homeButtonID) {
|
||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
tablet.gotoHomeScreen();
|
||||
} else if (!overlayPickResults.intersects || !overlayPickResults.overlayID === this.webOverlayID) {
|
||||
this.dragging = true;
|
||||
var invCameraXform = new Xform(Camera.orientation, Camera.position).inv();
|
||||
this.initialLocalIntersectionPoint = invCameraXform.xformPoint(entityPickResults.intersection);
|
||||
|
|
Loading…
Reference in a new issue