godot-demo-projects/viewport/3d_in_2d
shahriarlabib000 723331f814
updated README and Screenshots (#1111)
2024-08-28 18:09:22 -07:00
..
screenshots updated README and Screenshots (#1111) 2024-08-28 18:09:22 -07:00
3d_in_2d.gd Use static typing in all demos (#1063) 2024-06-01 12:12:18 +02:00
3d_in_2d.tscn Remove old and unused project settings, update various demos for 4.2 (#1024) 2024-03-26 18:01:58 +01:00
README.md updated README and Screenshots (#1111) 2024-08-28 18:09:22 -07:00
icon.webp
icon.webp.import
project.godot Update robot mesh for Godot 4 in 3D in 2D demo (#1106) 2024-08-26 00:07:36 +02:00
robot.glb Update robot mesh for Godot 4 in 3D in 2D demo (#1106) 2024-08-26 00:07:36 +02:00
robot.glb.import Update robot mesh for Godot 4 in 3D in 2D demo (#1106) 2024-08-26 00:07:36 +02:00
robot_3d.gd Use static typing in all demos (#1063) 2024-06-01 12:12:18 +02:00
robot_3d.tscn Update robot mesh for Godot 4 in 3D in 2D demo (#1106) 2024-08-26 00:07:36 +02:00
robot_demo.png
robot_demo.png.import Update demo files for Godot 4.2.1 (#1013) 2024-02-01 17:30:08 +01:00

README.md

3D in 2D

A demo showing how a 3D scene can be shown within a 2D one using viewports.

Language: GDScript

Renderer: Compatibility

Check out this demo on the asset library: https://godotengine.org/asset-library/asset/2804

How does it work?

The 3D robot is rendered to a custom Viewport node rather than the main Viewport. In the code, get_texture() is called on the Viewport to get a ViewportTexture, which is then assigned to the sprite's texture.

Screenshots

Screenshot