function CharacterRealism.ComputeLookAngle(A,o,u)local D,r,h=0,0,1 if not o then local u=workspace.CurrentCamera o=u.CFrame.LookVector end if o then local u=A.Player.Character local h=u and u:FindFirstChild("\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116")if h and h:IsA("\066\097\115\101\080\097\114\116")then local u=h.CFrame D=-u.RightVector:Dot(o)end r=o.Y end if u then h=u end D*=h r*=h return D,r end


function CharacterRealism:ComputeLookAngle(lookVector, useDir)
	local pitch, yaw, dir = 0, 0, 1
	
	if not lookVector then
		local camera = workspace.CurrentCamera
		lookVector = camera.CFrame.LookVector
	end
	
	if lookVector then
		local character = self.Player.Character
		local rootPart = character and character:FindFirstChild("HumanoidRootPart")
		
		if rootPart and rootPart:IsA("BasePart") then
			local cf = rootPart.CFrame
			pitch = -cf.RightVector:Dot(lookVector)
			
	
		end
		
		yaw = lookVector.Y
	end
	
	if useDir then
		dir = useDir
	end
	
	pitch *= dir
	yaw *= dir
	
	return pitch, yaw
end
