WebXR (AR) green cube?

I noticed that a small green cube appears when using WebXR and WebARSessionRoot underneath the model that I’m displaying, is there a way of deactivating it?

Original Post on Discord

by user 368204675922657280

Hello there – we have an experimental AI bot :robot: that might be able to help you with your question. Would you like to try this out?

How it works:
Reply to the messages of the bot that end with a thread_id to interact with it and ask follow-up questions. You can also mention the bot directly in this channel to get help.

Help requested: please wait a moment…

The green cube appearing beneath your model in WebXR is part of the preview feature for touch transform. To deactivate it, set arTouchTransform to false on the WebARSessionRoot component (see the documentation). Here’s an example of how to adjust that property in your component:

export class MyWebARComponent extends Behaviour {
    awake() {
        const webARSessionRoot = this.getComponent(WebARSessionRoot);
        if (webARSessionRoot) {
            webARSessionRoot.arTouchTransform = false;
        }
    }
}

Make sure to call this in the awake or start lifecycle method of one of your components to ensure that the WebARSessionRoot component has been initialized before you try to access it.

1 messages left GPT 4
thread_nKHdmPBW6rcoI2TV9lVeAzlE

Hmm kinda… I already have arTouchTransform disabled from the Editor, so it shouldn’t appear in that case.

by user 368204675922657280

I think this is a bug. I just tested it out, with the setting disabled and enabled in the editor, yet the cube remains

by user 368204675922657280

It is the default XR Avatar. On the WebXR component, select none in the avatar selection field.

Yes, it’s a bug with the default avatar in AR that will be fixed with the updated WebXR system