Trying to make head following camera thingy, but whenever I spin the camera to the right or left, the up and down tilt is different. (lighter? weaker? in a way) I just know it’s something simple, but I literally cannot figure it out ![]()
Is it the way roblox camera works? Is it something to do with the camera FOV?
the code:
function PlayerController:updateHeadFollow(dt)
if self.headFollow then
local cf = self.headFollow --this is just the player's camera cframe
local character = self.player.Character
local root = character.HumanoidRootPart
local r = root.CFrame:ToObjectSpace(cf).LookVector
--local y = - look.Y --- math.rad( math.clamp(math.deg(look.Y), -45, 45) )
local y = - r.Y / 2
self.animator:move('neck', CFrame.Angles(y,0,0), 5*dt)
self.animator:move('root', CFrame.Angles(y,0,0), 5*dt)
self.animator:move('leftLeg', CFrame.Angles(0,0,-y), 5*dt)
self.animator:move('rightLeg', CFrame.Angles(0,0,y), 5*dt)
end
end