Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you keep all parts within the user's screen (similar to scaling GUI objects)?

Asked by 3 years ago

Lets say I have a result podium with 5 places built with Parts and Humanoids are moved to the top of the parts after the game is done. How can I set the camera so that these parts are all in frame regardless of the size of the screen played on?

With GUI you can scale the size of the objects, is there a way to do something similar with camera and parts?

0
It’ll be the same camera view regardless of device. ArtFoundation 255 — 3y
0
This isn't true... if I have 6 parts lined up with only 5 in view, and I widen the screen (on PC for example as phones are fixed), then the 6th part will come into view, so the camera view does change depending on the frame size Hycheese 34 — 3y
0
see https://developer.roblox.com/en-us/api-reference/property/Camera/FieldOfView "The FieldOfView property sets how many degrees in the vertical direction (y-axis) the camera can view. Uniform scaling is enforced meaning the vertical and horizontal field of view are always related by the aspect ratio of the screen. This means the FieldOfView property also determines the horizontal field of view." Hycheese 34 — 3y
0
In other words the aspect ratio of the screen changes how much of the game is in view. And the aspect ratio changes by device Hycheese 34 — 3y

Answer this question