From 076bf0943e7e481b256a07fd920d6428a1b774ac Mon Sep 17 00:00:00 2001 From: David Rowe Date: Fri, 21 Apr 2017 10:33:24 +1200 Subject: [PATCH] Attach HMD "recording" indicator to camera --- scripts/system/record.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/system/record.js b/scripts/system/record.js index c280688294..dfc0e60cc2 100644 --- a/scripts/system/record.js +++ b/scripts/system/record.js @@ -50,15 +50,16 @@ // Create both overlays in case user switches desktop/HMD mode. var screenSize = Controller.getViewportDimensions(), recordingText = "REC", // Unicode circle \u25cf doesn't render in HMD. - AVATAR_SELF_ID = "{00000000-0000-0000-0000-000000000001}"; + CAMERA_JOINT_INDEX = -7; if (HMD.active) { // 3D overlay attached to avatar. hmdOverlay = Overlays.addOverlay("text3d", { text: recordingText, dimensions: { x: 3 * HMD_FONT_SIZE, y: HMD_FONT_SIZE }, - parentID: AVATAR_SELF_ID, - localPosition: { x: -1.0, y: 1.1, z: 2.0 }, + parentID: MyAvatar.sessionUUID, + parentJointIndex: CAMERA_JOINT_INDEX, + localPosition: { x: 0.95, y: 0.95, z: -2.0 }, color: { red: 255, green: 0, blue: 0 }, alpha: 0.9, lineHeight: HMD_FONT_SIZE,