From d9fbde2f662ad04f2a029c3df7d1a42b3f0f7f55 Mon Sep 17 00:00:00 2001 From: Jazmin Date: Tue, 13 Dec 2016 11:43:09 -0800 Subject: [PATCH] Update bubble height This height allows my friends to stay in my view comfortably, even when the space bubble is on. Even though it's significantly lower, I don't think anyone is not going to look down when someone starts to shrink down in front of them. --- scripts/system/bubble.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/system/bubble.js b/scripts/system/bubble.js index 16c190bc6f..8859181173 100644 --- a/scripts/system/bubble.js +++ b/scripts/system/bubble.js @@ -23,11 +23,13 @@ var bubbleButtonFlashState = false; // Used for flashing the HUD button upon activation var bubbleButtonTimestamp; + // Affects bubble height + const BUBBLE_HEIGHT_SCALE = 0.15; // The bubble model itself var bubbleOverlay = Overlays.addOverlay("model", { url: Script.resolvePath("assets/models/bubble-v12.fbx"), // If you'd like to change the model, modify this line (and the dimensions below) dimensions: { x: 1.0, y: 0.75, z: 1.0 }, - position: { x: MyAvatar.position.x, y: -MyAvatar.scale * 2 + MyAvatar.position.y + MyAvatar.scale * 0.28, z: MyAvatar.position.z }, + position: { x: MyAvatar.position.x, y: -MyAvatar.scale * 2 + MyAvatar.position.y + MyAvatar.scale * BUBBLE_HEIGHT_SCALE, z: MyAvatar.position.z }, rotation: Quat.fromPitchYawRollDegrees(MyAvatar.bodyPitch, 0, MyAvatar.bodyRoll), scale: { x: 2, y: MyAvatar.scale * 0.5 + 0.5, z: 2 }, visible: false, @@ -71,7 +73,7 @@ } Overlays.editOverlay(bubbleOverlay, { - position: { x: MyAvatar.position.x, y: -MyAvatar.scale * 2 + MyAvatar.position.y + MyAvatar.scale * 0.28, z: MyAvatar.position.z }, + position: { x: MyAvatar.position.x, y: -MyAvatar.scale * 2 + MyAvatar.position.y + MyAvatar.scale * BUBBLE_HEIGHT_SCALE, z: MyAvatar.position.z }, rotation: Quat.fromPitchYawRollDegrees(MyAvatar.bodyPitch, 0, MyAvatar.bodyRoll), scale: { x: 2, y: MyAvatar.scale * 0.5 + 0.5, z: 2 }, visible: true @@ -112,7 +114,7 @@ // Quickly raise the bubble from the ground up position: { x: MyAvatar.position.x, - y: (-((BUBBLE_RAISE_ANIMATION_DURATION_MS - delay) / BUBBLE_RAISE_ANIMATION_DURATION_MS)) * MyAvatar.scale * 2 + MyAvatar.position.y + MyAvatar.scale * 0.28, + y: (-((BUBBLE_RAISE_ANIMATION_DURATION_MS - delay) / BUBBLE_RAISE_ANIMATION_DURATION_MS)) * MyAvatar.scale * 2 + MyAvatar.position.y + MyAvatar.scale * BUBBLE_HEIGHT_SCALE, z: MyAvatar.position.z }, rotation: Quat.fromPitchYawRollDegrees(MyAvatar.bodyPitch, 0, MyAvatar.bodyRoll), @@ -127,7 +129,7 @@ Overlays.editOverlay(bubbleOverlay, { position: { x: MyAvatar.position.x, - y: MyAvatar.position.y + MyAvatar.scale * 0.28, + y: MyAvatar.position.y + MyAvatar.scale * BUBBLE_HEIGHT_SCALE, z: MyAvatar.position.z }, rotation: Quat.fromPitchYawRollDegrees(MyAvatar.bodyPitch, 0, MyAvatar.bodyRoll),