Views & Smoothing
Views decide where the camera sits. Unlike effects, a view stays until you change it. Effects layer on top of whichever view is active.
MotionFX:SetView(FX.View.ThirdPerson) -- blend over 0.4 s
MotionFX:ToggleView(FX.View.FirstPerson, 0) -- snap; again returns to Default
MotionFX:SetSmoothing(true)
Views
| View | Behaviour |
|---|---|
Default | Roblox's own camera, untouched. |
FirstPerson | Locked first person, using Roblox's LockFirstPerson. |
ThirdPerson | Over the shoulder, behind and to the right of the character. The mouse is locked to the centre and the character always faces where the camera looks. |
BackView | Locked in front of the character, looking back past it. Movement keeps following Roblox's unseen camera, so W still runs "forward" rather than toward the view. |
Switching
- Switching blends from whatever was on screen to the new view and swings around the character. Yaw and pitch blend separately, so even a half-turn such as BackView → ThirdPerson follows one steady path.
- Roblox's camera script keeps running underneath. Mouse, gamepad and touch input all still drive it.
- Player settings that a view changes (
CameraMode, zoom limits,Humanoid.AutoRotate) are saved when you leaveDefaultand restored when you return to it. - ThirdPerson and BackView pin the zoom so it never slips into first person. When a wall is in the way, they pull the camera in and keep a 0.3 stud margin from the wall.
Smoothing
With smoothing on, the rotation you see eases toward where Roblox's camera points instead of snapping to it. It works in every view, turning around the character in third person and around the head in first person. When you switch smoothing off, the camera finishes settling before the loop stops.
MotionFX:SetSmoothing(true, 8) -- responsiveness ≈ 1 / seconds (default 12)
print(MotionFX:IsSmoothing()) --> true
MotionFX.ViewSettings.Responsiveness = 20 -- live tweak
ViewSettings
MotionFX.ViewSettings is a live table. Change a field and the change applies on the next frame.
| Field | Default | Description |
|---|---|---|
ShoulderOffset | Vector3.new(2.75, 0.5, 6.5) | ThirdPerson: camera-space (right, up, back) offset from the head. |
BackViewDistance | 8 | BackView: studs in front of the character. |
BackViewHeight | 1 | BackView: studs above the head. |
HeadHeight | 1.5 | The point views look from or around, in studs above the HumanoidRootPart. |
Responsiveness | 12 | Smoothing speed. Higher values catch up faster. |
-- Swap shoulders
local settings = MotionFX.ViewSettings
settings.ShoulderOffset = Vector3.new(-settings.ShoulderOffset.X, settings.ShoulderOffset.Y, settings.ShoulderOffset.Z)