Is it possible to have a 3d scene with a shifted vanishing point?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By 2plus2makes5

For turn based battles I was considering making something like this:

enter image description here

but in 3d, with smaller and transparent UI so that the scene can be seen underneath it, basically the 3d scene covers the entire screen and is only in part covered by the ui.

The problem is that the vanishing point(to put it simple the center of the perspective) isn’t at the center of the screen, is it possible to do the same in 3d?

the screen is from one of the Ishar games

:bust_in_silhouette: Reply From: Lopy

You can do that, and much more, using Viewports and the related ViewportCointainer.

Edit: It should be as simple as placing the ViewportContainer at the desired location, using anchors or margins, and putting the Viewport as its direct child.

I was alrady using Viewports, but you “forced” me to make more experiments and i found a solution, but not a good one in my opinion because it sounds very expensive, basically i make the Viewport larger than the screen and then i use it as a texture of a sprite with a region as big as the screen to show only the part of the viewport i’m interested.

If you have better solution i’m happy to hear, i tried using Viewport.canvas_transform but with no results.

2plus2makes5 | 2021-02-14 18:44

Just to be clear i quickly made these images:

-the first image is a corridor full screen with the vanishing point at the center

-the second image is exactly like the ishar image i posted, the corridor is resized to fit a smaller window and the blue area is the ui

-the third image is what i wanted, the corridor is fullscreen but with a shifted vanishing point and the ui that only in part covers the corridor.

Maybe there’s a way i ignore but with they way you suggest i can only get the second result, while what i want, and got with my method, is the third

2plus2makes5 | 2021-02-15 18:43