Screen size is incorrect

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Alexande Daubricourt
:warning: Old Version Published before Godot 3 was released.

Hi,
On my android device, get_viewport().get_rect().size returns (1920, 1080);
But when i track a sprite position, and that sprite reach the right side, his x position is 1280.

And my pc (test) where the screen size is (1280, 720) when the sprite reach the right side, his x position is ~1275 which is correct.

Anyone know how to fix that, or am i just doing things in the wrong way to get the screen size ?

You can download the project at this link.

:bust_in_silhouette: Reply From: Alexande Daubricourt

My god!
All this time i was stuck on this dummy problem was because of the stretch_mode who was set on 2d (i watched a tutorial on how to keep my UI responsive and the guy said to switch on 2d) !

To keep responsive, stretch_mode must be on viewport !

Any chance you could provide a link or any sort of instructions about this solution?

Nick Mabe | 2017-08-05 21:55