0 votes

Hi all,

As per the title.

If I have a tilemap and I set it to say 20 tiles wide, then it looks good.
The tiles are the correct size on screen.

If I set it to 400 tiles wide, it scales them down to be tiny.

I then add a new 2D Camera and make it default camera but same thing.

How can I make the tilemap show at the correct size?

Thanks so much

UPDATE: Full example with code and problem here : https://imgur.com/a/AIX9k1b

asked Jan 2 in Engine by Robster (805 points)
edited Jan 2 by Robster

Changing the size of a tilemap doesn't change its scale. You must have something else going on there. Maybe if you share some screenshot(s) of what you're seeing it may be more apparent how to help you.

try setting camera2D scale less than 1

Here is all the info:


Thanks for taking a look. I'm tearing my hair out :-)

1 Answer

0 votes
Best answer

I found it.

Code was:

var map_size_px := size * _tile_map.cell_size
get_tree().set_screen_stretch(SceneTree.STRETCH_MODE_2D, SceneTree.STRETCH_ASPECT_KEEP, map_size_px)

Code is now:

var map_size_px := Vector2(600,400)
get_tree().set_screen_stretch(SceneTree.STRETCH_MODE_2D, SceneTree.STRETCH_ASPECT_KEEP, map_size_px)

The calc was wrong on the mapsizepx

Now I can define it manually and it works.

answered Jan 3 by Robster (805 points)
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.