3D Layered Guis

All the cool kids at RDC are upstairs playing Mario Kart and instead I’m here writing this quick module for you guys!

The module allows you to layer GUIs into the 3D world. Using it you could make a shop that displays the items in 3D or a character creation screen.

It’s straight forward enough to use. The module returns a function that when called with some depth, a BillboardGui will be created that far in-front of the camera.

This code for example puts my Gui 30 studs in-front of the camera

local gui3d = require(script:WaitForChild'Gui3D')

local threeDee = gui3d(30)
local frame = script.Parent:WaitForChild'ScreenGui':WaitForChild'Frame'

frame.Parent = threeDee

You can find the source on my GitHub, just insert it into a module script and get started!

*I am looking to convert this to accept ScreenGuis instead, maybe when I’m not so tired.
*I will switch it to respect the inset eventually…

10 Likes

How well does it preform at the outer edges?
Could you post a picture for this 3D character but placed in the left bottom corner?

woah, could this be used to make like multiple camera views on your screen at once?

So it’s this:

So this module does not position models/parts but instead allows you to place a GUI at some depth from the camera. This means you can layer them with the 3D view allowing certain models to render Infront of them while others behind.

1 Like