r/howdidtheycodeit • u/Alert-Track-8277 • 4d 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 😅
8
Upvotes
10
u/noobgiraffe 4d ago edited 4d 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.
2
u/shuanDang 3d ago
if you want to do this with a 2d image, you can do a "Perspective Warp" effect on it. Look up that term. I mean you got half of it already haha