Unclamp camera min/max zoom distance properties from engine code

As a developer, Roblox thwarts my use cases with clamps on camera min/max zoom distance. It’s possible to work around this by modifying the camera scripts, but is unnecessarily complicated because I’m still unable to use the CameraMax/MinZoomDistance properties – their clamps are hardcoded into the engine.

Use case:

Zoom out to show full extents of large capital ship (whether it be in the ocean, air, or space) or other large character/craft that the player is controlling, like a golem. (Specifically, I’m using a zoom of 800). If I’m zooming out to pan around an island or something that the player isn’t controlling, I’d just set the CameraType to scriptable and manually tween the camera’s CFrame. The min/max zoom properties only affect camera controls for characters.

One suggestion might be to make the ship models smaller, but this is a deal breaker for me – it interferes with material scaling/lighting, and players can walk outside the ship as it’s moving. I don’t want to make these characters any smaller. Any downsides to extreme zoom are being mitigated by upcoming automatic LOD and previous changes that made distant objects show even at lower graphics levels anyway.

Solution 1 Part 1:

Use reasonable clamping values. The max (400) and min (0.5) clamps are literally the default values for max/min zoom – the benefit of being able to adjust the min/max zoom levels is drastically reduced due to not being able to increase it past the default range.

Solution 1 Part 2:

Clamp zoom levels through CameraScript and not the engine (after all, the cameras are supposed to be 100% in Lua). Will need to deprecate CameraMin/MaxZoomDistance properties (preferably also all their awful Dev______ compatriots) and provide replacement through a module/bindable endpoint or similar.

Solution 2:

Don’t clamp min/max camera zoom at all. There’s not really a reason to clamp zoom. If I really want to, I can edit the camera scripts and set it to +/- math.huge. Out of the two options, this is preferable to me.

8 Likes

Max zoom distance is now unclamped.

4 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.