I’m currently InputBegan
to track mouse movements however it seems to act unexpectedtly when window is unfocused, any workarounds?
UserInputService.InputBegan:Connect(function(_input)
if _input.Position then
_startPosition = _input.Position
print("started")
end
end)
UserInputService.InputEnded:Connect(function(_input)
if _input.Position then
_endPosition = _input.Position
DrawLine(Vector2.new(_startPosition.X, _startPosition.Y), Vector2.new(_endPosition.X, _endPosition.Y))
print("ended")
end
print((_startPosition - _endPosition).Magnitude)
end)