Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support transitions between cameras with Perspective/Orthographic projections #456

Open
brianrodri opened this issue Jan 30, 2025 · 0 comments
Labels
3D Issues concerning 3D scenes enhancement New feature or request phantom camera Related to PhantomCamera nodes

Comments

@brianrodri
Copy link

brianrodri commented Jan 30, 2025

Project Type

3D

Feature Description

Currently, only cameras with the same projection can be tweened. This is a feature request to support tweening between a camera with a perspective projection and a camera with orthographic projection.

Use Cases

This is specific to my game, but in summary, I want cutscenes to appear in a perspective projection and then seamlessly transition to gameplay, which uses an orthographic perspective.

For example, gameplay would look similar to the Godot Tactical RPG demo from the Asset Library:
Image

Cutscenes, however, would use a perspective projection to provide a "realistic" view of the environment and character models.

(Optional) Proposed Solution

A perfect solution would be infeasible since we'd need to fiddle with the underlying projection matrices in the Godot source code. An "approximate" solution, however, should be possible in GDScript; please see this excellent Cinemachine thread for an explanation of the strategy:

[...] you can fake it with the knowledge that an ortho camera can be approximated by a perspective camera with a very very small FOV, placed far enough away so that the screen size at the target matches the screen size of your ortho camera. You can use CM to blend to that fake camera, then cut to the real ortho camera at the end, and it will approximate a believable blend.

Here are some example images for convenience:

perspective-to-ortho top down

perspective-to-ortho oblique

@ramokz ramokz added enhancement New feature or request phantom camera Related to PhantomCamera nodes 3D Issues concerning 3D scenes labels Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3D Issues concerning 3D scenes enhancement New feature or request phantom camera Related to PhantomCamera nodes
Projects
None yet
Development

No branches or pull requests

2 participants