Hello!
-
What do you want to achieve? Keep it simple and clear!
I want to be able to offset the viewport of the camera, similar to the docking behavior of Roblox Studio. For example, if I have a GUI on the right of the screen, it will skew the camera viewport “center” to the left. I have seen this working with manipulating the 10th and 11th values of the Camera’s CFrame.
So, CFrame(0,0,0,1,0,0,0,1,0,[X Offset Here],[Y Offset Here],1) is the layout. -
What is the issue? Include screenshots / videos if possible!
No Issues I just need help with finding the proper way to manipulate the vectors. -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I have tried looking for a solution on the Developer Hub but I did not find any.
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
This is an example of what I am trying to achieve.
Here is a “normal” Camera Coordinate Frame.
workspace.CurrentCamera.CFrame = CFrame.new(0,2,0,1,0,0,0,1,0,0,0,1) --normal cframe of a camera at 0,2,0 in the 3-D world.
Here is what it looks like:
Here is an example of half the viewport as a “GUI”
This is a camera but with the viewport offset by .6 on the 10th value of the CFrame.
workspace.CurrentCamera.CFrame = CFrame.new(0,2,0,1,0,0,0,1,0,.6,0,1) --cframe offset by .6 on the 10th value of a camera at 0,2,0 in the 3-D world.
I also have a frame with text on it that is taking up the right side of the screen.
Here is what it looks like:
I am wanting the camera to take up to 4 offsets (top offset, left offset, right offset, and bottom offset.)
Any help would be appreciated. Thanks!
EDIT: Found a thread similar but the thread is unresolved. This might help explain what exactly I am trying to achieve. Link: Screen space camera transformation after perspective projection