Merge pull request #510 from AleziaKurdis/fixBubbleScript

Restore the original dimensions of the bubble (for the "Shield" app.)
This commit is contained in:
Julian Groß 2023-07-09 09:53:52 +02:00 committed by GitHub
commit 3184e9373a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -25,9 +25,9 @@
"type": "Model", "type": "Model",
"modelURL": Script.resolvePath("assets/models/Bubble-v14.fbx"), // If you'd like to change the model, modify this line (and the dimensions below) "modelURL": Script.resolvePath("assets/models/Bubble-v14.fbx"), // If you'd like to change the model, modify this line (and the dimensions below)
"dimensions": { "dimensions": {
"x": MyAvatar.sensorToWorldScale * 2, "x": MyAvatar.sensorToWorldScale,
"y": (0.75 * MyAvatar.sensorToWorldScale) * ((MyAvatar.scale * 0.5) + 0.5), "y": (0.75 * MyAvatar.sensorToWorldScale),
"z": MyAvatar.sensorToWorldScale * 2 "z": MyAvatar.sensorToWorldScale
}, },
"position": { "x": MyAvatar.position.x, "y": -MyAvatar.scale * 2 + MyAvatar.position.y + MyAvatar.scale * BUBBLE_HEIGHT_SCALE, "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.multiply(MyAvatar.orientation, Quat.fromVec3Degrees({"x": 0.0, "y": 180.0, "z": 0.0})), "rotation": Quat.multiply(MyAvatar.orientation, Quat.fromVec3Degrees({"x": 0.0, "y": 180.0, "z": 0.0})),
@ -90,9 +90,9 @@
Entities.editEntity(bubbleOverlay, { Entities.editEntity(bubbleOverlay, {
"dimensions": { "dimensions": {
"x": MyAvatar.sensorToWorldScale * 2, "x": MyAvatar.sensorToWorldScale,
"y": (0.75 * MyAvatar.sensorToWorldScale) * ((MyAvatar.scale * 0.5) + 0.5), "y": 0.75 * MyAvatar.sensorToWorldScale,
"z": MyAvatar.sensorToWorldScale * 2 "z": MyAvatar.sensorToWorldScale
}, },
"position": { "position": {
"x": MyAvatar.position.x, "x": MyAvatar.position.x,
@ -127,9 +127,9 @@
if (delay < BUBBLE_RAISE_ANIMATION_DURATION_MS) { if (delay < BUBBLE_RAISE_ANIMATION_DURATION_MS) {
Entities.editEntity(bubbleOverlay, { Entities.editEntity(bubbleOverlay, {
"dimensions": { "dimensions": {
"x": MyAvatar.sensorToWorldScale * 2, "x": MyAvatar.sensorToWorldScale,
"y": (0.75 * MyAvatar.sensorToWorldScale) * ((1 - ((BUBBLE_RAISE_ANIMATION_DURATION_MS - delay) / BUBBLE_RAISE_ANIMATION_DURATION_MS)) * MyAvatar.scale * 0.5 + 0.5), "y": (0.75 * MyAvatar.sensorToWorldScale) * (1 - ((BUBBLE_RAISE_ANIMATION_DURATION_MS - delay) / BUBBLE_RAISE_ANIMATION_DURATION_MS)),
"z": MyAvatar.sensorToWorldScale * 2 "z": MyAvatar.sensorToWorldScale
}, },
// Quickly raise the bubble from the ground up // Quickly raise the bubble from the ground up
"position": { "position": {
@ -143,9 +143,9 @@
// Keep the bubble in place for a couple seconds // Keep the bubble in place for a couple seconds
Entities.editEntity(bubbleOverlay, { Entities.editEntity(bubbleOverlay, {
"dimensions": { "dimensions": {
"x": MyAvatar.sensorToWorldScale * 2, "x": MyAvatar.sensorToWorldScale,
"y": (0.75 * MyAvatar.sensorToWorldScale) * ((MyAvatar.scale * 0.5) + 0.5), "y": 0.75 * MyAvatar.sensorToWorldScale,
"z": MyAvatar.sensorToWorldScale * 2 "z": MyAvatar.sensorToWorldScale
}, },
"position": { "position": {
"x": MyAvatar.position.x, "x": MyAvatar.position.x,