Start typing to search packages!
humanoidcameraoffsetcontroller
By @coffilhg
Roblox
MirroredHumanoidCameraOffsetController
This module lets you set the LocalPlayer' Humanoid.CameraOffset reliably and smoothly. Useful for making a custom shiftlock or movement system!
Available Here!
-
This repository ~ src/init.luau
-
HumanoidCameraOffsetController = "coffilhg/humanoidcameraoffsetcontroller@1.0.1" -
Rotriever
HumanoidCameraOffsetController = "github.com/Coffilhg/Useful-Modules@HumanoidCameraOffsetController/1.0.1"
Features
- Smoothly updates the LocalPlayer'
Humanoid.CameraOffset. - Read the current smoothed offset any time.
- Start, stop, and tune the internal damper directly.
Installation
Use the "Available Here!" section to obtain the Module.
Require the module:
local HumanoidCameraOffsetController = require(PathToModule)
Basic Usage
-- e.g. classic value used for custom shiftlock
HumanoidCameraOffsetController:SetCameraOffset(Vector3.new(2, 0, 0))
task.wait(0.3)
-- read the current value anytime (mid interpolation too)
local currentOffset = HumanoidCameraOffsetController:GetCameraOffset()
print(currentOffset)
task.wait(0.3)
-- abort anytime (mid interpolation too)
HumanoidCameraOffsetController:Stop()
This module updates Humanoid.CameraOffset on RunService.PreRender. SetCameraOffset() begins smoothing automatically.
API
HumanoidCameraOffsetController:SetCameraOffset(cameraOffset)
CameraOffsetmust be aVector3.- Sets the target
Humanoid.CameraOffsetand begins smooth interpolation. - If nil, falls back to
Vector3.zero, not a Vector3 or nil - yields a warning and ignores the call.
HumanoidCameraOffsetController:GetCameraOffset()
- Returns the current interpolated offset.
HumanoidCameraOffsetController:Start()
- Begins the internal
RunService.PreRenderupdate loop. - Use this to resume updates after
Stop(). Manually.
HumanoidCameraOffsetController:Stop()
- Stops the internal update loop.
- Halts interpolation until
Start()orSetCameraOffset()is called again.
HumanoidCameraOffsetController.Damper
- Exposes the internal
EasySmoothDampinstance. - Advanced users can tune:
Damper.CurrentValueDamper.CurrentGoalDamper.CurrentSpeedDamper.SmoothTimeDamper.MaxSpeed
Notes
Stop()disconnects the update loop; it does not reset the current offset or goal.- Require this module from client-side scripts only.
- Want to set the camera offset instantly? Do
:SetCameraOffset(desiredValue)(this sets.Damper.CurrentGoal = desiredValue -- and starts the update loop) and.Damper.CurrentValue = desiredValue
DEPENDENCIES
License / License & Attribution
Licensed under the Apache License, Version 2.0.
You may use, modify, and redistribute this module freely, provided that the original copyright notice and license header at the top of the file are preserved.
See the Apache License 2.0 for full terms.
Attribution to all dependencies is included in Notice
© 2026 Coffilhg
Package Details
Install command (Click to copy)
Version
1.0.1
License
Apache-2.0
Safe for commercial use
Modified files must carry a notice of changes. If the package ships a NOTICE file, its attributions must be preserved.
Automated license review — not legal advice.
