How do you do room transitions for a top down 2d game.
Asked Answered
A

2

0

hi. I'm currently making a top down game and need a camera system for my map. The map is more or less divided up into individual rooms of varying sizes similar to something like a zelda dungeon. when ever the player enters a room, I want the camera to operate within the bounds of that specififc room. When the player leaves a room and enters the bounds of another room , I want the camera to then switch to operate within the bounds of the newly entered room (again similar to zelda). I'm thinking about using Area 2ds to accomplish this however trying to find camera tutorials for godot 4 that fit my needs has been pretty unsucessful. any ideas?

Aromatic answered 3/3, 2024 at 20:31 Comment(0)
P
0

Aromatic you can do this with the Camera's current property. Just put a camera in each room and switch which one is active depending on the room. If all your rooms are in one scene/dungeon, it should be easy.

Proximate answered 4/3, 2024 at 0:52 Comment(0)
U
0

This is a 2D game yes? Maybe you can use a bit of math to find the center of the room (easy if they are on a grid), then something like “when entering a room, move camera to room center”?

Unblushing answered 4/3, 2024 at 2:40 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.