This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes

```
extends Sprite2D

func ready():
var viewportTexture = ViewportTexture.new()
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

Godot version v4.0.2.stable.official [7a0977ce2]
in Engine by (21 points)

1 Answer

0 votes

enter image description here

  • 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
by (1,975 points)

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

nhượng quyền cafe

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.