Hi,
For some reason the looking is kinda stuttery and if I hold a direction, for example, to the left it will not continue to look to the left, it will stop.
Here’s a piece of the code:
UIS.InputChanged:Connect(function(InputObject, gameProcessedEvent)
if gameProcessedEvent then return end
if InputObject.KeyCode == Enum.KeyCode.Thumbstick2 then
local StickMovement = InputObject.Position
local Delta = Vector2.new(StickMovement.x / controllerSensitivity, StickMovement.y / controllerSensitivity) * Smoothness
local X = targetAngleX + Delta.y
targetAngleX = math.clamp(X, -80, 80) -- look up and down
targetAngleY = (targetAngleY - Delta.x) % 360 -- look left and right
end
end)
Video: