diff --git a/src/bit-systems/hoverable-visuals-system.ts b/src/bit-systems/hoverable-visuals-system.ts index 63874534d5..84d45d28b6 100644 --- a/src/bit-systems/hoverable-visuals-system.ts +++ b/src/bit-systems/hoverable-visuals-system.ts @@ -10,6 +10,7 @@ import { HoveredHandRight, HoveredRemoteLeft, HoveredRemoteRight, + Inspected, RemoteLeft, RemoteRight } from "../bit-components"; @@ -45,9 +46,10 @@ export function hoverableVisualsSystem(world: HubsWorld) { hoverableVisualsExitQuery(world).forEach(eid => HoverableVisualsUniforms.delete(eid)); hoverableVisualsEnterQuery(world).forEach(eid => updateHoverableVisuals(world, eid)); hoverableVisualsQuery(world).forEach(eid => { + const isInspecting = anyEntityWith(world, Inspected); const isFrozen = APP.scene!.is("frozen"); const isEntityPinned = isPinned(eid); - const showEffect = !isEntityPinned || isFrozen; + const showEffect = (!isEntityPinned && !isInspecting) || isFrozen; const uniforms = HoverableVisualsUniforms.get(eid); if (uniforms && uniforms.length) { diff --git a/src/utils/permissions-utils.js b/src/utils/permissions-utils.js index 1ef6bb9beb..84c5842794 100644 --- a/src/utils/permissions-utils.js +++ b/src/utils/permissions-utils.js @@ -2,6 +2,7 @@ import { hasComponent } from "bitecs"; import { HoldableButton } from "../bit-components"; +import { CAMERA_MODE_INSPECT } from "../systems/camera-system"; // https://github.com/mozilla/hubs/wiki/Hubs-authorization export function showHoverEffect(el) { @@ -15,7 +16,8 @@ export function showHoverEffect(el) { ? window.APP.hubChannel.can("spawn_emoji") : window.APP.hubChannel.can("spawn_and_move_media")) && (!isPinned || window.APP.hubChannel.can("pin_objects")); - return (isSpawner || !isPinned || isFrozen) && canMove; + const isInspecting = el.sceneEl.systems["hubs-systems"].cameraSystem.mode === CAMERA_MODE_INSPECT; + return (isSpawner || !isPinned || isFrozen) && canMove && !isInspecting; } export function canMove(entity) {