Merge pull request #11837 from SamGondelman/hOverlay

Fix tablet home button highlight overlay dimensions
This commit is contained in:
Andrew Meadows 2017-11-17 08:25:27 -08:00 committed by GitHub
commit d207803f26
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View file

@ -155,8 +155,7 @@ WebTablet = function (url, width, dpi, hand, clientOnly, location, visible) {
localRotation: { x: 0, y: 1, z: 0, w: 0 },
dimensions: { x: 4 * tabletScaleFactor, y: 4 * tabletScaleFactor, z: 4 * tabletScaleFactor },
solid: true,
outerRadius: 25 * tabletScaleFactor,
innerRadius: 20 * tabletScaleFactor,
innerRadius: 0.9,
ignoreIntersection: true,
alpha: 1.0,
color: { red: 255, green: 255, blue: 255 },

View file

@ -409,15 +409,16 @@ resizeTablet = function (width, newParentJointIndex, sensorToWorldScaleOverride)
// update homeButton
var HOME_BUTTON_Y_OFFSET = ((tabletHeight / 2) - (tabletHeight / 20)) * sensorScaleOffsetOverride;
var homeButtonDim = 4 * tabletScaleFactor;
Overlays.editOverlay(HMD.homeButtonID, {
localPosition: {x: -0.001, y: -HOME_BUTTON_Y_OFFSET, z: 0.0},
dimensions: { x: 4 * tabletScaleFactor, y: 4 * tabletScaleFactor, z: 4 * tabletScaleFactor}
dimensions: { x: homeButtonDim, y: homeButtonDim, z: homeButtonDim}
});
// Circle3D overlays render at 1.5x their proper dimensions
var highlightDim = homeButtonDim / 3.0;
Overlays.editOverlay(HMD.homeButtonHighlightID, {
localPosition: { x: 0, y: -HOME_BUTTON_Y_OFFSET + 0.003, z: -0.0158 },
dimensions: { x: 4 * tabletScaleFactor, y: 4 * tabletScaleFactor, z: 4 * tabletScaleFactor },
outerRadius: 25 * tabletScaleFactor,
innerRadius: 20 * tabletScaleFactor
dimensions: { x: highlightDim, y: highlightDim, z: highlightDim }
});
};