I have this first-person system for my game. It works perfectly fine on PC, but does not you move your camera on mobile. I use this function to allow camera rotation on PC, how would i make it so it works for mobile aswell?
input.InputChanged:connect(function(inputObject)
if not running then return end
if FirstPerson then
if inputObject.UserInputType == Enum.UserInputType.MouseMovement then
local delta = Vector2.new(inputObject.Delta.x/Sensitivity,inputObject.Delta.y/Sensitivity) * Smoothness
local X = TargetAngleX - delta.y
TargetAngleX = (X >= 80 and 80) or (X <= -80 and -80) or X
TargetAngleY = (TargetAngleY - delta.x) %360
end
end
end)