Hi,
My camera class only works for pc because it uses Enum.UserInputType.MouseMovement. How do I make it compatible for mobile?
For example:
self.connections:Connect(UserInputService.InputChanged, function(input: InputObject, gameProcessedEvent: boolean)
if input.UserInputType == Enum.UserInputType.MouseMovement then
local delta = Vector2.new(
input.Delta.X / Settings.Sensitivity,
input.Delta.Y / Settings.Sensitivity)
* Settings.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)