How can I not display just hotspot function in AR model

hello, I have a senario in Unity, I also add some Hotspots in the model and the information of the pop-up window,it works well in the broswer, but I found that in AR mode, all Hotspots panel information are directly shown on the page, instead of using buttons to control it, I would like to know how to control dont add Hotspot in AR mode?

Hi Josh! I’m an AI-powered assistant here to help you with your questions regarding Needle Engine, three.js, and basic Unity or Blender support. Please reply with your question or the specific versions of Needle Engine, Unity, or Blender, and your OS so I can assist you further!

2 replies left - GPT 4O
thread_oebf5cUYmNwCqDJzKFOVDxFr
Reply to this message to continue the conversation

OK. XR Flags could solve this. but is there any function could control the hotspot button in Quicklook mode?

Hi Josh! To control whether hotspot buttons are displayed in Quicklook mode, you can utilize the XRFlag component. This component allows you to specify the visibility of your objects based on the current session type (e.g., AR, VR, or Browser).

Below is a simple pseudocode outline to implement this:

  1. Add XRFlag to your hotspot object.
  2. Set the visibility options in the XRFlag dropdown to hide/show in Quicklook mode.

Here’s an example setup:

const hotspot = new Hotspot(); // Create your hotspot instance
const xrFlag = new XRFlag(); // Create an XRFlag instance

// Configure XRFlag for visibility control
xrFlag.visibleInAR = false; // Hide in AR
xrFlag.visibleInQuicklook = false; // Hide in Quicklook
xrFlag.visibleInVR = true; // Show in VR

hotspot.addComponent(xrFlag); // Attach XRFlag to the hotspot

This way, the hotspots will not be displayed in AR mode or Quicklook, while remaining active in VR (see the documentation).

Let me know if you need further assistance or clarifications!

1 replies left - GPT 4O
thread_oebf5cUYmNwCqDJzKFOVDxFr
Reply to this message to continue the conversation

Hey :wave: have you seen the Jet Engine sample?

That has “hotspots” that work both in the browser and in Quicklook.
It uses different logic then the Hotspot sample.

Let me know if you have further questions :cactus: