mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 16:41:02 +02:00
Merge pull request #11837 from SamGondelman/hOverlay
Fix tablet home button highlight overlay dimensions
This commit is contained in:
commit
d207803f26
2 changed files with 6 additions and 6 deletions
|
@ -155,8 +155,7 @@ WebTablet = function (url, width, dpi, hand, clientOnly, location, visible) {
|
||||||
localRotation: { x: 0, y: 1, z: 0, w: 0 },
|
localRotation: { x: 0, y: 1, z: 0, w: 0 },
|
||||||
dimensions: { x: 4 * tabletScaleFactor, y: 4 * tabletScaleFactor, z: 4 * tabletScaleFactor },
|
dimensions: { x: 4 * tabletScaleFactor, y: 4 * tabletScaleFactor, z: 4 * tabletScaleFactor },
|
||||||
solid: true,
|
solid: true,
|
||||||
outerRadius: 25 * tabletScaleFactor,
|
innerRadius: 0.9,
|
||||||
innerRadius: 20 * tabletScaleFactor,
|
|
||||||
ignoreIntersection: true,
|
ignoreIntersection: true,
|
||||||
alpha: 1.0,
|
alpha: 1.0,
|
||||||
color: { red: 255, green: 255, blue: 255 },
|
color: { red: 255, green: 255, blue: 255 },
|
||||||
|
|
|
@ -409,15 +409,16 @@ resizeTablet = function (width, newParentJointIndex, sensorToWorldScaleOverride)
|
||||||
|
|
||||||
// update homeButton
|
// update homeButton
|
||||||
var HOME_BUTTON_Y_OFFSET = ((tabletHeight / 2) - (tabletHeight / 20)) * sensorScaleOffsetOverride;
|
var HOME_BUTTON_Y_OFFSET = ((tabletHeight / 2) - (tabletHeight / 20)) * sensorScaleOffsetOverride;
|
||||||
|
var homeButtonDim = 4 * tabletScaleFactor;
|
||||||
Overlays.editOverlay(HMD.homeButtonID, {
|
Overlays.editOverlay(HMD.homeButtonID, {
|
||||||
localPosition: {x: -0.001, y: -HOME_BUTTON_Y_OFFSET, z: 0.0},
|
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, {
|
Overlays.editOverlay(HMD.homeButtonHighlightID, {
|
||||||
localPosition: { x: 0, y: -HOME_BUTTON_Y_OFFSET + 0.003, z: -0.0158 },
|
localPosition: { x: 0, y: -HOME_BUTTON_Y_OFFSET + 0.003, z: -0.0158 },
|
||||||
dimensions: { x: 4 * tabletScaleFactor, y: 4 * tabletScaleFactor, z: 4 * tabletScaleFactor },
|
dimensions: { x: highlightDim, y: highlightDim, z: highlightDim }
|
||||||
outerRadius: 25 * tabletScaleFactor,
|
|
||||||
innerRadius: 20 * tabletScaleFactor
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue