Centering the players camera with cameraoffset?

I have a custom character that spins and bounces as a ball, the ball is inside a basic r6 rig but covers the whole character.
the problem Im having is that when the camera is set to the humanoid, its not precisely at the center so when the player spins the camera shakes.

here is the localscript:

function setcam()
	pcall(function()
	local plr = game.Players.LocalPlayer
	local cam = workspace.CurrentCamera
	local hum = plr.Character:FindFirstChild("Humanoid")
	if hum then
	cam.CameraSubject = plr.Character.Humanoid
	end
		hum.CameraOffset = plr.Character.HumanoidRootPart.Position
	end)
end



while true do
	wait(0.5)
	setcam()
end

I need to set the camera to the humanoid so any future parts that get added to the players character will turn invisible in first person and also not obstruct the players view in 3rd person.

Perhaps the camera isn’t updating fast enough?
You could use BindToRenderStep instead of your while loop, and have the priority as Camera + 1

game:GetService("RunService"):BindToRenderStep("cameraSet", Enum.RenderPriority.Camera.Value + 1, setcam)

that doesn’t quite center it. whats going on is the cameras exact point isnt at the center of the entire rig, and when the rig spins, similar to a wheel and axle that isn’t spinning true it shakes.
it would be nice if I could set the camerasubject to the humanoidrootpart, but this would destroy the first/third person needs listed in the post.