Adapt frame's position & size in surface gui to player's screen

So basically I’m trying to resize a ViewportFrame in a SurfaceGui to make that the corners of the Gui be adapted to the screen corners.
image
First I think I need to center the ViewportFrame to the center of the player’s screen, like this:


Then I need the corners of the ViewportFrame to be like this:

And have a result like this:

I really don’t know how could I do it. Maybe with some CFrame, Vector3 and UDim2 stuff can be possible, but I dont know the method.

1 Like

Why not CFrame the Part the SurfaceGui is on to the player’s Head Position and angle it so the bottom is farther away than the top?

I can’t do that because the part that handles the Surface Gui is supposed to be a portal (that’s why I’m making all this mess). I searched for the formula to make the deepth illusion in the portal, and I realized I need to stretch the ViewportFrame to camera resolution or something like that.

I saw it in that video.

I think this topic kinda died :slightly_frowning_face: