I’m trying to make a custom camera where the camera would turn smoothly along with the cursor if the player moves their mouse. I achieved that goal, yet the displacement of the camera is a bit chopped and is lagging behind the actual part.
Here’s a video demonstration:
As you can see, the camera’s movement lags a lot and is chopped. The last few seconds of the video is where the camera needs to be.
Resources.Services.RS.RenderStepped:Connect(function()
Resources.Map.SnowPlough.WiperL:PivotTo(Resources.Map.SnowPlough.WLAnchor:GetPivot() Resources.Map.SnowPlough.WiperL.Angle.Value)
Resources.Map.SnowPlough.WiperR:PivotTo(Resources.Map.SnowPlough.WRAnchor:GetPivot() Resources.Map.SnowPlough.WiperR.Angle.Value) Resources.Map.SnowPlough:PivotTo(Resources.Map.SnowPlough.PosAndAng.Value)
local NoiseX = math.noise((tick() - TimeNow) / 20 * 75) * 0.5
local NoiseY = math.noise((tick() - TimeNow) / 20 * 100) * 0.75
local NoiseZ = math.noise((tick() - TimeNow) / 20 * 25) * 0.25
local MX = (-0.5 + Resources.Mouse.X / Resources.Mouse.ViewSizeX)
local MY = (-0.5 + Resources.Mouse.Y / Resources.Mouse.ViewSizeY)
Resources.Services.TS:Create(Resources.Camera, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {CFrame =
Resources.CPart.CFrame * (
CFrame.Angles(math.rad((-50 * MY) + (NoiseX * 1)), math.rad((-150 * MX) + (NoiseY * 1)), math.rad(NoiseZ * 10)) *
CFrame.new(NoiseX, NoiseY, NoiseZ))
}):Play()
end)
Any help is appreciated! Thanks in advance