Four years have now passed, four years of inconsistent programming have all been part of the experience, the journey. Finally, I have achieved the understanding to tackle this problem and with aid of the code provided by @koziahss, I have successfully programmed the Three-hundred and sixty degree unrestricted rotation camera and have published the model for public use:
Product
https://create.roblox.com/store/asset/101529540779450/
The following video will only showcase the product as of the 13th of February 2025. {00:00:11}
Variables:
local XSensitivity = 1.4 -- Resistance on the X-Axis (West-East) Higher value, more resistance
local YSensitivity = .0045 -- Sensitivity on the Y-Axis (North-South) Higher value, lower resistance
local CameraZoomMultiplier = 3
local MinimumCameraDistance = 1.1 -- Minimum Zoom
local MaximumCameraDistance = 16 -- Maximum Zoom
local qW = 0.017453 -- This number was provided by Roblox's scripting AI 2025, the origin of this number is to be considered random and any associations to external media are unintentional
-- qW is the last property of a default CFrame and from observed behaviour does the following action: controls the sensitivity of the Y axis independently from YSensitivity
Services:
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local Players = game:GetService("Players")
local UserGameSettings = UserSettings():GetService("UserGameSettings")
-- UserGameSettings allows a local script to access settings that the player (user) has set
-- For example: Volume, Camera Sensitivity and other values you can receive on the (but not limited to) Roblox in-game menu
Camera zoom:
local CameraDistance = 6
local function ZoomInput(value,gameprocessed)
if gameprocessed then return end
if (math.abs(CameraDistance)-(value*CameraZoomMultiplier)) <= MinimumCameraDistance then CameraDistance = MinimumCameraDistance return end
if (math.abs(CameraDistance)-(value*CameraZoomMultiplier)) >= MaximumCameraDistance then CameraDistance = MaximumCameraDistance return end
CameraDistance = CameraDistance-(value*CameraZoomMultiplier)
end
UserInputService.PointerAction:Connect(function(wheel,pan,pinch,gameprocessed)
ZoomInput(wheel,gameprocessed)
end)
UserInputService.TouchPinch:Connect(function(touchPositions, scale, velocity, state, gameProcessedEvent)
ZoomInput(scale,gameProcessedEvent)
end)
(No external artificial intelligence was used during the development of this script.)
The complete code can be found within the released model, with explanations for various sections.
Thank you @koziahss and @ranto828 for the information provided, your explanations have considerably contributed to the development of this code.
Have a good life.
The End. Sincerely, @oscoolerreborn.