How do you display 3d GUI to players?

Hey, I’m hoping to add VR support to Miner’s Haven, but I’ve been unable to find any documentation for how to make GUI for VR. I was told at RDC that there is api or a module somewhere for making 3D GUI for VR but I’ve been unable to find it. Could someone point me in the right direction?

Mostly, they are just parts with SurfaceGuis. I don’t really have much more useful info other than that.

I’ve always used this for 3D guis!

1 Like

There are some corescript modules for 3D VR GUIs that might be worth taking a look at.

1 Like

A 3D gui is just a surfacegui. Is there something specific you want to do?

a surface gui that always appears in front of (or in any direction around) the player, but does not follow the camera when they move their head in VR

Yeah you just move it on render step. The camera works a little different in VR. Camera.CFrame is used as the central position, and any head movement is added on by roblox afterward. So you can set the CFrame to 0,0,0 and then the user will be able to move around that point. To get a front-facing gui you would just put the gui in front of the camera’s CFrame. If you wanted to put something directly in front of the user you would use Camera:GetRenderCFrame() to get the exact head cframe.

I could probably do this myself, I’m only asking though because I’m 90% sure I was told there already is a module/api or something for this.

edit: Just ended up writing my own module for this. Thanks for the tid bit about the camera

Yeah, you probably heard about Panel3D, which I wrote. It’s probably since grown out of being useful as a general purpose UI module, so I wouldn’t worry about it if I were you! It’s just SurfaceGuis.