Camera jitters when using Humanoid.CameraOffset

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    a good camera offset simulating shiftlock while not being shiftlock

  2. What is the issue? Include screenshots / videos if possible!
    Camera jitters when rotating or jumping while RotationType is set to CameraRelative and Humanoid.CameraOffset is set to anything else than Vector3.zero

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    Every Developer Hub solution I’ve seen is for first person uses while i want the a solution that is for third person or just says that this was an engine bug that has been fixed in the Roblox Studio Version 625.

local Player = game:GetService("Players").LocalPlayer

print("Activated")


game:GetService("RunService").RenderStepped:Connect(function()
	if Player:FindFirstChild('Cutscene') == nil and Player.Character:FindFirstChild('Torso') and Player.Character.Humanoid.Health > 0 then
		local offset = Player.Character.Torso.CFrame:ToObjectSpace(Player.Character.HumanoidRootPart.CFrame).Position

		local camOffset = Vector3.new(-offset.X, -offset.Y, -offset.Z)
		
		if Player:FindFirstChild("Aiming") and Player:FindFirstChild("Aiming").Value == true then
			print("aiming")
			game:GetService("TweenService"):Create(Player.Character.Humanoid, TweenInfo.new(.055, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), {CameraOffset = camOffset + Vector3.new(2.5,1,0)}):Play()
			--Player.Character.Humanoid.CameraOffset = Vector3.new(2.5,1,0)
		else
			print("notaiming")
			game:GetService("TweenService"):Create(Player.Character.Humanoid, TweenInfo.new(.055, Enum.EasingStyle.Sine, Enum.EasingDirection.In), {CameraOffset = camOffset}):Play()
		end
		
	else
		print("died or cutscene")
	end

end)
1 Like

Maybe try to lock the player in first person? Also, can you show a video?

Hey there! I’ve been experiencing this exact problem! I’ve created a post on it and I think someone might have figured out the problem, but were working on it currently.
Anyhow the post here if you want to check it out:

I can tell you when it gets figured out though :3

2 Likes

https://gyazo.com/8c1baead5b65811f65615ea38f41bd5d

i’ve disabled the jumping animations in case it was the issue - it wasn’t.

Honestly I don’t know any fix for this without making the camera scriptable, but somebody else figured a way to do it, which is on @FroDev1002 post. Good luck! Also disable AutoRotate on the humanoid by scripts or else it will look glitched for other clients

With more reasearch i’ve stumbled upon this post (Camera Coding (Setting the offset) - #4 by daireb) which contains a script which, after modifications, is good enough for me.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.