r/howdidtheycodeit • u/Alert-Track-8277 • 2h ago
How did they code this map zoomin effect?
Link here: https://www.spritefusion.com/game-dev-atlas
Map takes a second to load. Im mainly interested in the zoom-in effect providing a sense of 3d. Its sorta warping the map so the bottom gets stretched a bit? I dont even know what to google here 😅
2
Upvotes
2
u/noobgiraffe 1h ago edited 1h ago
It's fully 3d map.
When fully zoomed out camera looks directly down, when you zoom in they bring camera closer and rotate it so it's looking more forward and less down.
So you just make 3d scene with normal perspective camera looking stright down and far away enough so you can see the entire map. When person zooms in you bring the camera down and the same time you lerp the angle from -90 degrees to around -45 it seems. Actual angles depend on coordinate system but you get the idea.