change SubViewportContainer stretch_shrink's type from int
to float
#6921
Replies: 3 comments 1 reply
-
What would a value smaller than one do? This is to speed up rendering by downscaling the viewport It being an int makes sense or you'll have bad scaling factors very easily Also it has to be greater than or equal to 1
I suspect that you might not |
Beta Was this translation helpful? Give feedback.
-
If you want your project to scale to various screen resolutions, use Godot's built-in support for multiple resolutions (stretch modes) instead of implementing scaling manually. |
Beta Was this translation helpful? Give feedback.
-
I should not use a viewport to scale my |
Beta Was this translation helpful? Give feedback.
-
Anyone know the reason
stretch_shrink
must be anint
? I think afloat
can make it more useful.I find it's hard to change the scale of a scene which is made by a bounch of Control node. The scene is a child of a CenterContainer, so it's position and size is determined only by it's parent the CenterContainer. I finally find a work around: add the scene to a SubViewport then add the SubViewport to a SubViewportContainer, then add the SubViewportContainer to the CenterContainer. Then I change the stretch_shrink of the SubViewportContainer to make the scene bigger.
stretch_shrink's type is int and must be greater than 1, this situation possibly limits it's ability. I don't know whether I used subviewport in a correct way.
Beta Was this translation helpful? Give feedback.
All reactions