How do i make a camera offset that follows the head?

The issue with this is mainly Humanoid.CameraOffset sucks a lot for a couple of reasons

the first is it doesnt follow the heads rotation which my script rotates

ive tried to just do Cam.CFrame = Cam.CFrame * CFrame.new(.9, .9, .025)
but it would just break in first person.

1 Like

so you want an offset, but not in first person?

i need some kind of hellmet camera offset which is mounted to the right of the head and a little bit at the top and it follows the head rotation (hellmet was not a misspell its a game)

you want it to act as normal but on an offset? I’m confused. What behavior do you want with rotations, and do you want first person?

or do you just want to completely replicate the hellmet camera system

something i recorded in hellmet:

k try

local player = game.Players.LocalPlayer
local cam = workspace.CurrentCamera
local RS = game:GetService("RunService")

RS.RenderStepped:Connect(function()
    local char = player.Character
    local humanoid = char and char:FindFirstChildOfClass("Humanoid")
    local head = char and char:FindFirstChild("Head")

    if humanoid and head and cam.CameraType == Enum.CameraType.Custom then
        -- distance between cam and head
        local dist = (cam.CFrame.Position - head.Position).Magnitude

        if dist > 1 then
            -- third person: apply offset
            cam.CFrame = cam.CFrame * CFrame.new(0.9, 0.9, 0.025)
        else
			-- ohio
        end
    end
end)

i need something similar to that recording but i cant quite make it myself

(First person)

this would work in third person but im looking for a first person one

I’m confused – can you tell me the behavior you want when:

  • Zooming in
  • Zooming out
  • First person
  • Rotating camera

if you look in the recording you can see its first person and the camera follows the head’s rotation precisely

so you want the head to follow your camera’s rotation and to be locked in first person?

the head already follows the camera rotation but the camera is so off from the heads position and rotation

let me give you a quick video example on mine vs hellmets

1 Like

here
:


mine sucks so bad.

I’m confused… What do you want to change from hellmet’s camera

i want the first video (my camera) to become more like the second (Senseis game)

i use this but it sucks:

humanoid.CameraOffset = Vector3.new(0.9,0.9,0.025)

and i the head code i use is:

local Players    = game:GetService("Players")
local RunService = game:GetService("RunService")
local player     = Players.LocalPlayer
local cam        = workspace.CurrentCamera

local OFFSET = Vector3.new(0.8, 0.6, 0.2)

local function onCharacterAdded(char)
	local root = char:WaitForChild("HumanoidRootPart")
	local neck
	for _, v in ipairs(char:GetDescendants()) do
		if v:IsA("Motor6D") and v.Name == "Neck" then
			neck = v
			break
		end
	end
	if not neck then return end

	local initialC0 = neck.C0
	
	RunService:BindToRenderStep("HeadPitch", Enum.RenderPriority.Character.Value, function()
		local pitch, _, _  = cam.CFrame:ToOrientation()
		neck.C0 = initialC0 * CFrame.Angles(-pitch, 0, 0)
	end)
end

player.CharacterAdded:Connect(onCharacterAdded)
if player.Character then
	onCharacterAdded(player.Character)
end

my code sucks i know