Use Window inside ViewportTexture (4.0)

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Vercte
extends Sprite2D

func _ready():
	var viewportTexture =
	viewportTexture.viewport_path = get_viewport()
	texture = viewportTexture

the error

How do I use the base viewport for something like this? It’s for splitscreen with multiple windows. The engine just doesn’t accept a Window for a ViewportTexture even though it inherits.

enter image description here

:bust_in_silhouette: Reply From: rakkarage

  • set SubViewportContainer.Stretch to true

  • set camera anchor Fixed TopLeft

  • cannot select sprite here with mouse but can edit inspector or can turn it into own scene

Thank you for the useful information!Have a good day.

nhượng quyền cafe

monacocoffee | 2023-05-20 08:27