Ever wanted to inspect your items? you must know how tiring it is to make a custom camera controller each time, or how annoying it is to implement the settings u want and need, including adding mobile and controller compability, well this module is for you!
With this module you can easily inspect your items such as guns, swords, everything, and the beauty of it is that its so simple!
Features:
- This supports any type of camera, meaning you can use it on workspace.CurrentCamera or ViewportFrames, anything!
- Zoom In Out
- PC/Controller/Mobile Compability
- Collision Handling to prevent looking through the ground
And much more!
Easily :Activate or :Deactivate the module and change settings however you like!
Showcase:
Installation:
OrbitCameraController.rbxm (7.9 KB)
Test Place.rbxl (323.0 KB)
Example Usage:
local CameraController = OrbitCameraController.new(FocusTarget, Camera)
CameraController:Activate()
-- Change Settings like this:
CameraController.ZoomSensitivity = 1
CameraController.EnableCollisionDetection = false
CameraController.LockZoom = true
-- Full Settings List:
local DEFAULT_SETTINGS = {
SensitivityX = 0.5, -- Mouse/touch horizontal rotation sensitivity
SensitivityY = 0.4, -- Mouse/touch vertical rotation sensitivity
MinVerticalAngle = -60, -- Minimum vertical angle in degrees (looking down)
MaxVerticalAngle = 80, -- Maximum vertical angle in degrees (looking up)
MinZoom = 2, -- Minimum zoom distance from target
MaxZoom = 20, -- Maximum zoom distance from target
StartingDistance = 10, -- Initial camera distance from target
StartingHorizontalAngle = 0, -- Initial horizontal rotation angle in degrees
StartingVerticalAngle = 20, -- Initial vertical rotation angle in degrees
SmoothingFactor = 0.2, -- Camera rotation smoothing (0-1, higher = faster)
EnableCollisionDetection = true, -- Whether camera avoids colliding with objects
ResetToOriginalPosition = true, -- Whether camera returns to starting position when input ends
ResetSmoothness = 0.9, -- Smoothness of the reset animation
ResetDuration = 0.8, -- Duration of the reset animation in seconds
ZoomSensitivity = 1, -- Mouse wheel zoom sensitivity
ZoomSmoothness = 0.1, -- Zoom transition smoothness (0-1, higher = faster)
ControllerSensitivityX = 3.0, -- Gamepad horizontal rotation sensitivity
ControllerSensitivityY = 2.5, -- Gamepad vertical rotation sensitivity
TouchSensitivityX = 0.25, -- Touch horizontal rotation sensitivity
TouchSensitivityY = 0.2, -- Touch vertical rotation sensitivity
TouchZoomSensitivity = 0.05, -- Touch pinch zoom sensitivity
EnableMobileSupport = true, -- Whether to handle touch input for mobile devices
EnableControllerSupport = true, -- Whether to handle gamepad input
LockZoom = false, -- Whether to lock the zoom at a specific distance
CameraZoomLockValue = 10 -- The locked zoom distance when LockZoom is true
}
No need to give credit just comment if youre using it or not though so i can know if its helpful, it will help me alot.
In the test place you can click Get Settings and it will give you the settings required to start the camera in that position instead of you having to play around with the settings and taking ages to find out the correct position to start it