diff --git a/applications/metadata.js b/applications/metadata.js index 3592754..9034da5 100644 --- a/applications/metadata.js +++ b/applications/metadata.js @@ -82,7 +82,7 @@ var metadata = { "applications": "caption": "REFRESH" }, { - "isActive": false, + "isActive": true, "directory": "nametags", "name": "Nametags", "description": "Display users' display names above their heads.", diff --git a/applications/nametags/nametags.js b/applications/nametags/nametags.js index 3f4a419..d1b190b 100644 --- a/applications/nametags/nametags.js +++ b/applications/nametags/nametags.js @@ -71,6 +71,7 @@ text: display_name, backgroundAlpha: 0.0, billboardMode: "full", + dimensions: { x: 0.8, y: 0.2, z: 0.1 }, unlit: true, parentID: user_uuid, position: Vec3.sum(user.position, { x: 0, y: 0.4 + jointInObjectFrame.y, z: 0 }), @@ -109,9 +110,9 @@ // https://apidocs.overte.org/Entities.html#.textSize Script.setTimeout(() => { let textSize = Entities.textSize(user_nametags[user_uuid].text, display_name); - Entities.editEntity(user_nametags[user_uuid].text, { dimensions: { x: textSize.width + 0.25, y: textSize.height - 0.05, z: 0.1 } }); + Entities.editEntity(user_nametags[user_uuid].text, { dimensions: { x: textSize.width + 0.25, y: textSize.height + 0.07, z: 0.1 } }); Entities.editEntity(user_nametags[user_uuid].background, { - dimensions: { x: Math.max(textSize.width + 0.25, 0.6), y: textSize.height - 0.05, z: 0.1 }, + dimensions: { x: Math.max(textSize.width + 0.25, 0.6), y: textSize.height + 0.05, z: 0.1 }, }); }, 100); } @@ -138,7 +139,7 @@ const headJointIndex = user.getJointIndex("Head"); const jointInObjectFrame = user.getAbsoluteJointTranslationInObjectFrame(headJointIndex); Entities.editEntity(user_nametags[user_uuid].text, { - position: Vec3.sum(user.position, { x: 0, y: jointInObjectFrame.y + Math.abs(user.scale - 1) + 0.4, z: 0 }), + position: Vec3.sum(user.position, { x: 0.01, y: jointInObjectFrame.y + Math.abs(user.scale - 1) + 0.4, z: 0 }), text: display_name, }); });