Reputation: 26550
I'm trying to figure out how one can "offset" a camera within its viewport (the root viewport in this case) to create an off-center camera. To illustrate, using a standard Camera
(3D) results in a vanishing point of the parallel lines in the center of the screen:
What I'm trying to achieve is to move the vanishing point a bit to the right, to the center of non-UI area.
I was expecting that Camera.h_offset
has this effect. However, it looks like it is only another way of applying a translation to the camera (i.e., equivalent to translating the camera itself to the left/right):
Am I missing a trick?
Upvotes: 3
Views: 674
Reputation: 40170
I don't think you can do that with a perspective projection. Well, aside from using a ViewportContainer
which you move to the side. You would use a frustum projection instead, and then use frustum_offset
to skew it. You probably want to se the size very small.
Upvotes: 2