Hello! I put the character in the middle of the viewport: But when I run the scene, the character appears in the down-right corner: It seems that the resolution is changed when I run the scene. But this is strange, because, I didn't put any test width & height, I didn't apply any stretch also: How should I solve this problem, so that when running the scene, the viewport matches the originally set size?
If you have a high resolution monitor, enable HiDPI in the project settings. For the Stretch Mode, set it to 2D and Aspect to Keep Height. Also check the settings if you are using a Camera2D, as it's position and offset will affect the position of Sprites.
Is your character it's own scene that gets instanced? If so you want to open that scene in the editor, disable the viewport extents since they are irrelevant to that scene and then move your character centered to the scenes origin where the visible axis is. That is to say center your character to the scenes 0, 0 position.
@cybereality said: If you have a high resolution monitor, enable HiDPI in the project settings. For the Stretch Mode, set it to 2D and Aspect to Keep Height.
This solved the problem, especially after setting the Stretch Mode to 2D.
Regarding Camera2D, I am not using this node.
@Megalomaniak said: Is your character it's own scene that gets instanced? If so you want to open that scene in the editor, disable the viewport extents since they are irrelevant to that scene and then move your character centered to the scenes origin where the visible axis is. That is to say center your character to the scenes 0, 0 position.
Currently, the character is just a node that is included in the main scene.
But, I will consider these hints if I decide to make the character a separate scene.
Thank you guys for your advice!