Godot Version
V-4.2.2
Question
Good day! I am developing a game that combines 2.5D and 3D gameplay. In certain scenes, the camera follows a predefined path, moving along with the character (similar to Little Nightmares). This predefined camera path allow for slight rotation, and at specific points along the path, the camera parameters may change.
In other scenes, the gameplay uses a standard 3D third-person perspective, where the camera is positioned behind the character and rotates freely. For this setup, used two rig nodes to control the camera’s rotation.
My challenge is that separating the camera and character into different scenes creates issues for the 3D third-person setup, where the camera requires precise integration with the character’s controls.
How can I design a system that accommodates both camera setups seamlessly without causing conflicts? I would appreciate any suggestions or best practices for implementing this.
So the only experience I have had is a death camera transition from 3rd person. It ends up being two cameras, when the player dies I position the death camera exactly where the third person camera is and switch which is current. It is seamless.
For what you may be doing. I would take your non-3rd person camera and position it where your 3rd person camera is, switch current, then slerp it out to its intended position. (For a 3rd person to outer camera transition)
I assume you have some sort of smoothing for the outer camera so just change the target to the other cameras transform and back.
You could probably shoe all this behavior into the outer camera system, or just make a specialized camera number 3 that handles the transition smoothing between cameras.
So basically
transition_camera.global_transform = start_camera.global_transform
transition_camera.current = true
target_camera = other_camera
// Smooth transition to target camera in process function
transition_camera.global_transform = transition_camera.global_transform.interpolated_with(target_camera.global_transform, SPEED)
...
// Once close enough
target_camera.current = true
You will need a support system to keep references to cameras for finding the target camera. But if both cameras are on the same player scene it could be easier.
Thank you for your reply! I appreciate the effort, but I may not have explained my issue clearly. The problem I described isn’t about scene transitions but rather the setup of the camera and character.
To clarify, in my game:
For example, in level 1, the camera is predefined and only moves left or right.
In level 2, the camera is also predefined but moves up or down.
In level 3, the gameplay shifts to a full 3D third-person setup where the camera is positioned behind the character with free rotation.
My confusion lies in the third-person setup, where the camera is mostly fixed to the character and exists in the same scene. If I instantiate the character in a 2.5D scene, it will bring along the third-person camera setup, which doesn’t align with the 2.5D camera logic. How should I structure my scenes or nodes to handle these differences without creating conflicts?
Okay, this is what I understood already.
Transition to the 2.5d camera with what I described above.
I mean if the 3rd person camera is not compatible with a 2.5d scene and it should be the 2.5d camera. Switch to the 2.5d camera?
Like I said before, use a 3rd camera to transition between them. Activating the desired camera with current
property.
If you want to try to somehow have one camera pull all duties. I would NOT recommend this, it is bad coding practice.
I would have separate rigs and cameras for each scenario for level/character behavior, and a special camera to transition between them if you want a smooth transition.