Hi there!

I'm looking to switch from Unity to Godot

In Unity, for top down games is possible to create a camera transition between zones (no scenes, zones in the same scene) using Cinemachine and script to limit the camera to a confinder

This allows creators to create an effect similar to the one seen in 2d Zelda games, where the trick is:
1 - Define a collider that envolves an area
2 - Define another collider to envolve the 2nd area
3 - Create a Cinemachine camote with the componen CameraConfinder
4 - As the current confinder, set the collider from the 1st area
5 - With a script, at the moment the player enters in the 2nd area collider, change the camera confinder to the collider entered

I was looking for a way to make this in Godot but did not find any information about it

Is possible to reproduce a similar effect?

Sorry if is a beginner question but I'm just switching and I'm having troubles to understand the Godot workflow managing this kind of tasks

  • RuKeN Not sure why you want a collider for the camera, but I get what you're looking for. I'll try to talk about it in Zelda terms. 😃

    How I would do it (especially in a 2d game like this above) is make the whole area (let's say a dungeon) as one scene, but have the camera points be a set of values that the camera "snaps" to whenever a character moves between rooms (you could even store them in an array if you want to get fancy, but for only four rooms, hard coding is probably easy enough). So you could have an event for when the character crosses a door or area2d that moves them to the next room and then pans the camera to that fixed location. You just got know your Vector2 points (x,y). Also make sure to pause the game while the camera moves (but leave pause mode as process so the camera still moves) to avoid any shenanigans with input while the camera is moving. Then I would connect a signal when the camera reaches where its supposed to be to unpause the game.

Are you talking about something like this?

    duane thanks for you reply!

    Not at all, my main approach is to keep the camera inside an area/collider

    For example, in the demo Minimal Game, here is something similar but with different scenes, my goal is to make something like the camera in the Minimal Game demo but whith those 4 scenes the project has in only 1 scene and make transitions while the player enters in a different room (this part is easy, the difficult one is to keep the camera inside a collider)

      RuKeN Not sure why you want a collider for the camera, but I get what you're looking for. I'll try to talk about it in Zelda terms. 😃

      How I would do it (especially in a 2d game like this above) is make the whole area (let's say a dungeon) as one scene, but have the camera points be a set of values that the camera "snaps" to whenever a character moves between rooms (you could even store them in an array if you want to get fancy, but for only four rooms, hard coding is probably easy enough). So you could have an event for when the character crosses a door or area2d that moves them to the next room and then pans the camera to that fixed location. You just got know your Vector2 points (x,y). Also make sure to pause the game while the camera moves (but leave pause mode as process so the camera still moves) to avoid any shenanigans with input while the camera is moving. Then I would connect a signal when the camera reaches where its supposed to be to unpause the game.

        SnapCracklins thanks! I need to process all the information here 😅 about the collider, is not for the camera itself, is to define the limits for the camera viewport in every room

        Anyway, for sure with some coding I will be able to make the camera work in that way