2d_in_3d.gd 272 B

123456789
  1. extends Node3D
  2. func _ready():
  3. # Clear the viewport.
  4. var viewport = $SubViewport
  5. $SubViewport.set_clear_mode(SubViewport.CLEAR_MODE_ONCE)
  6. # Retrieve the texture and set it to the viewport quad.
  7. $ViewportQuad.material_override.albedo_texture = viewport.get_texture()