0 votes

Hello!

I use 3.2.3.stable
I have a scene:

MainNode2d
+Control
+ViewportContainer
++AdditionalViewport
+++Node2D
+++Camera2D

In project settings I've set up window stretch mode: 2d and keep aspect. MainNode2d and Node2D have scripts, which printing globalmouseposition. After changing manually window size, (e.g. I receive small scene in the middle and dark borders), I click on left top corner of the scene and I expect to receive Vector(0,0) from both scripts. And MainNode2d did show Vector(0,0) but Node2D dit not. Node2D shows Vector(0,0) only on the left top corner of the window not the scene. How can I stretch AdditionalViewport or what calculation should I make to receive expected positions.

Godot version 3.2.3.
in Engine by (22 points)

Isn't the top left corner of the scene and of the screen the same point? Doesn't MainNode2d occupy all of the screen?
Generally, viewports just fill the ViewportContainer they reside in. If you allow the container to stretch, then the viewport should follow.

Please log in or register to answer this question.

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 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 webmaster@godotengine.org with your username.