{"id":"coffilhg/humanoidcameraoffsetcontroller","name":"humanoidcameraoffsetcontroller","scope":"coffilhg","platform":"roblox","description":"Description Placeholder","version":"1.0.1","latest":"1.0.1","versions":["1.0.0","1.0.1"],"license":"Apache-2.0","licenseRating":"safe","licenseCaveats":["Modified files must carry a notice of changes. If the package ships a NOTICE file, its attributions must be preserved."],"licenseVerified":true,"dependencies":{"coffilhg/easysmoothdamp":{"version":"~1.0.0","alias":"EasySmoothDamp"}},"integrity":"0dbfb11bb5ec79048320c6b4c1b8b7125a2e9e417e07f6dad9b534dba00fea1b","likes":0,"downloads":0,"install":"forest install coffilhg/humanoidcameraoffsetcontroller","url":"https://forest.dev/p/roblox/coffilhg/humanoidcameraoffsetcontroller","files":"https://api.forest.dev/ai/package/roblox/coffilhg/humanoidcameraoffsetcontroller/files","readme":"# HumanoidCameraOffsetController\r\nThis module lets you set the LocalPlayer' **[Humanoid.CameraOffset](<https://create.roblox.com/docs/reference/engine/classes/Humanoid#CameraOffset>)** reliably and smoothly. Useful for making a custom shiftlock or movement system!\r\n\r\n\r\n\r\n## Available Here!\r\n- **[This repository](src/init.luau) ~ [src/init.luau](src/init.luau)**\r\n- **[Wally](<https://wally.run/package/coffilhg/humanoidcameraoffsetcontroller>)**\r\n\r\n    ```toml\r\n    HumanoidCameraOffsetController = \"coffilhg/humanoidcameraoffsetcontroller@1.0.1\"\r\n    ```\r\n- **Rotriever**\r\n\r\n    ```toml\r\n    HumanoidCameraOffsetController = \"github.com/Coffilhg/Useful-Modules@HumanoidCameraOffsetController/1.0.1\"\r\n    ```\r\n\r\n<!-- **[Creator Store](<https://create.roblox.com/store/category/gameplay?creatorName=coffilhg>)** ~ **[HumanoidCameraOffsetController](<https://create.roblox.com/store/asset/123456789/HumanoidCameraOffsetController>)**-->\r\n\r\n---\r\n\r\n## Features\r\n- Smoothly updates the LocalPlayer' `Humanoid.CameraOffset`.\r\n- Read the current smoothed offset any time.\r\n- Start, stop, and tune the internal damper directly.\r\n\r\n---\r\n\r\n## Installation\r\n\r\nUse the \"*Available Here!*\" section to obtain the Module.\r\n\r\nRequire the module:\r\n```lua\r\nlocal HumanoidCameraOffsetController = require(PathToModule)\r\n```\r\n\r\n---\r\n\r\n## Basic Usage\r\n\r\n```lua\r\n-- e.g. classic value used for custom shiftlock\r\nHumanoidCameraOffsetController:SetCameraOffset(Vector3.new(2, 0, 0))\r\n\r\ntask.wait(0.3)\r\n-- read the current value anytime (mid interpolation too)\r\nlocal currentOffset = HumanoidCameraOffsetController:GetCameraOffset()\r\nprint(currentOffset)\r\n\r\ntask.wait(0.3)\r\n-- abort anytime (mid interpolation too)\r\nHumanoidCameraOffsetController:Stop()\r\n```\r\n\r\nThis module updates `Humanoid.CameraOffset` on `RunService.PreRender`. `SetCameraOffset()` begins smoothing automatically.\r\n\r\n---\r\n\r\n## API\r\n\r\n### `HumanoidCameraOffsetController:SetCameraOffset(cameraOffset)`\r\n- `CameraOffset` must be a `Vector3`.\r\n- Sets the target `Humanoid.CameraOffset` and begins smooth interpolation.\r\n- If nil, falls back to `Vector3.zero`, not a Vector3 or nil - yields a warning and ignores the call.\r\n\r\n### `HumanoidCameraOffsetController:GetCameraOffset()`\r\n- Returns the current interpolated offset.\r\n\r\n### `HumanoidCameraOffsetController:Start()`\r\n- Begins the internal `RunService.PreRender` update loop.\r\n- Use this to resume updates after `Stop()`. Manually.\r\n\r\n### `HumanoidCameraOffsetController:Stop()`\r\n- Stops the internal update loop.\r\n- Halts interpolation until `Start()` or `SetCameraOffset()` is called again.\r\n\r\n### `HumanoidCameraOffsetController.Damper`\r\n- Exposes the internal `EasySmoothDamp` instance.\r\n- Advanced users can tune:\r\n  - `Damper.CurrentValue`\r\n  - `Damper.CurrentGoal`\r\n  - `Damper.CurrentSpeed`\r\n  - `Damper.SmoothTime`\r\n  - `Damper.MaxSpeed`\r\n\r\n---\r\n\r\n## Notes\r\n\r\n- `Stop()` disconnects the update loop; it does not reset the current offset or goal.\r\n- Require this module from client-side scripts only.\r\n- Want to set the camera offset instantly? Do `:SetCameraOffset(desiredValue)` (this sets `.Damper.CurrentGoal = desiredValue -- and starts the update loop`) and `.Damper.CurrentValue = desiredValue`\r\n\r\n---\r\n\r\n## DEPENDENCIES\r\n\r\n- [EasySmoothDamp](<https://github.com/Coffilhg/Useful-Modules/tree/EasySmoothDamp>)\r\n\r\n---\r\n\r\n## License / License & Attribution\r\n\r\nLicensed under the Apache License, Version 2.0.\r\n\r\nYou 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.\r\n\r\nSee the [Apache License 2.0](LICENSE) for full terms.\r\n\r\nAttribution to all dependencies is included in [Notice](NOTICE)\r\n\r\n© 2026 Coffilhg","readmeTruncated":false}