DEV Community

Sunder Iyer
Sunder Iyer

Posted on

TIL Godot 3D in 2D Basics


So for my game tool, I want text to drive 3d cubes (what is this dude making??). Basically the UI needs to manipulate a 3D scene.

So I made a new project to try and prototype this, anticipating unknown complexities and hurdles.
I have to tell you, Godot's infrastructure made this unbelievably easy. This is the result and it took very little to setup.
UI Element on the left, 3D scene on the right

Steps of Construction?
Step 1: Setup your 3D scene. I just dropped a rotating cube and camera.
Step 2: Setup your 2D scene with your desired controls
Step 3: Add a Viewport Container
Step 4: Add a Viewport child to the Viewport Container
Step 5: Set a desired Size for the Viewport
Step 6: Drag and drop your 3D scene onto this Viewport

And that's it. Of course, manipulating it is another story. Stay tuned!
Scene hierarchy and file system above 2D view

Top comments (0)