> For the complete documentation index, see [llms.txt](https://legacydmc.gitbook.io/dynamic/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://legacydmc.gitbook.io/dynamic/camera-exports/setcurrentcamerapitchoffset.md).

# setCurrentCameraPitchOffset

setCurrentCameraPitchOffset (accPitchOffset \[Float] , coastPitchOffset \[Float] , brakePitchOffset \[Float] , idlePitchOffset \[Float] )

Sets an offset for all camera pitchs, if you wish to use it to only a specific offset, parse the others as 0.

```lua
        inputContextButton(
            "Acceleration Pitch: ",
            "Acceleration Pitch",
            "Controls how much the camera looks up when accelerating.",
            0, 10, -10, 0.05,
            camAccPitchOffset,
            function(val)
                camAccPitchOffset = val
                dynamic:setCurrentCameraPitchOffset(camAccPitchOffset, camCoastPitchOffset, camBrakePitchOffset, camIdlePitchOffset)
            end
        )

        inputContextButton(
            "Coasting Pitch: ",
            "Coasting Pitch",
            "Controls how much the camera looks up when coasting.",
            0, 10, -10, 0.05,
            camCoastPitchOffset,
            function(val)
                camCoastPitchOffset = val
                dynamic:setCurrentCameraPitchOffset(camAccPitchOffset, camCoastPitchOffset, camBrakePitchOffset, camIdlePitchOffset)
            end
        )

        inputContextButton(
            "Braking Pitch: ",
            "Braking Pitch",
            "Controls how much the camera looks down when braking.",
            0, 10, -10, 0.05,
            camBrakePitchOffset,
            function(val)
                camBrakePitchOffset = val
                dynamic:setCurrentCameraPitchOffset(camAccPitchOffset, camCoastPitchOffset, camBrakePitchOffset, camIdlePitchOffset)
            end
        )

        inputContextButton(
            "Idle Pitch: ",
            "Idle Pitch", 0.05,
            "Controls how much the camera looks down when idling.",
            0, 10, -10,
            camIdlePitchOffset,
            function(val)
                camIdlePitchOffset = val
                dynamic:setCurrentCameraPitchOffset(camAccPitchOffset, camCoastPitchOffset, camBrakePitchOffset, camIdlePitchOffset)
            end
        )
```
