I’ve noticed an issue with many Roblox games and my current one. Even if the player looks down while their camera is already at the bottom of the screen, it will still move the ViewModel down.
Current code i’m using with spring module:
=
RunService.RenderStepped:Connect(function(dt)
InFirstPerson()
if not Equipped.Value then return end
----- Viewmodel Movement -----
local distance = (LocalPlayer.Character.Head.Position - workspace.CurrentCamera.CFrame.Position).Magnitude
local Delta = UserInputService:GetMouseDelta()
swayspring:shove(Vector3.new(-Delta.X/2500, Delta.Y/2500, 0))
local UpdatedSway = swayspring:update(dt)
local UpdatedBob = bobspring:update(dt)
if WeaponViewmodel ~= nil then
WeaponViewmodel:PivotTo(Camera.CFrame * CFrame.new(UpdatedSway.X, UpdatedSway.Y, 0) * CFrame.new(UpdatedBob.X, UpdatedBob.Y, 0))
bobspring:shove(Vector3.new(Bob(5), Bob(10), Bob(5)) / 10 * (Character.PrimaryPart.Velocity.Magnitude) / 125)
end
----- Viewmodel Movement -----
end)
Example video of what im jibber jabbering about: robloxapp-20240808-1323322.wmv (9.4 MB)
I’m turning into pomni over this rn