UI made with html cannot adapt to VR

It looks like when VR mode is enabled, the html UI cannot adapt to the vr duel-camera, it only display as standard UI like the vr is not enabled.

is there anyway we can get around this?

Use the PlayCanvas UI system would be your best bet.

Generally in VR experiences, the UI is presented in 3D space.

yea the build in UI works perfectly with VR, but there are some contents we need to use html, that’s why I ask.

Not possible as the VR view is purely in WebGL. You would have to somewhere render html/CSS to a texture and render that in the 3D world.

3 Likes

this is a very good idea… …

Any Update on this ? , with the latest version can we achive the above usecase(HTML in VR MODE) ?

@Venkata_Hemanth It’s not not possible to render HTML DOM objects in WebXR VR.

AFAIK, it’s a restriction from the WebXR VR rendering side, not PlayCanvas

1 Like

You can mark this as solved (sorta); I cracked this one in WebXRPress Library’s Billboard template. Just drop in your html code with inline and style tag CSS. It even does :hover and :action rules in VR too. See my post update “Easy as HTML/CSS because it is HTML/CSS” in the developer log. :slight_smile:

https://playcanvas.com/project/873970/overview/webxrpress-library

1 Like