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 4 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 — 4y
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 — 4y
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 — 4y
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 — 4y

Answer this question