Input_src - Mobile Controls Creator [DEV BUILD]

I’ve created a mobile controls creator module that lets you make mobile controls, it was designed to make mobile compatibility easier by fixing common issues, input_src offers events similar to UIS except it’s made for touch screens only but doesn’t have inputObject returned

it doesn’t only offer controls for just a fix but also contains “value set” that allows you to edit how it should behave, along with theme customization for each control type

EXAMPLE

INSTALLATION

You can only get this from my GitHub repository here or if you’re not familiar with the GitHub then click on “Releases” or go to this page here, after downloaded the module, insert it into the place where client can access and you can finally begin scripting

it’s preferred that you should have controls as variable to be accessible across the scope, otherwise editing it seems impossible

local replicatclient = game:GetService("ReplicatedStorage")
local input_src = require(replicatclient.input_src)

local ref_joy = input_src.Joystick.create(screen_gui_path, zone_path, UDim2.fromScale(0.7, 0.7), 1) --screen gui path means the ScreenGUI you want to store and zone path as optional
ref_joy.joystick_settings.image_enabled = true
ref_joy.joystick_settings.dot_size = 1.7
ref_joy:update_preference()

ref_joy.joystick_inputbegin:Connect(function()
	-- code
end)

ref_joy.joystick_inputend:Connect(function()
	-- code
end)

CREDITS

tnavarts - for Signal module
HowManySmall - for Janitor module (cleanup tool)
ReelPlum - for SnapToBorder module (borrowed from his minimap)


NOTES BEFORE END

documents on my GitHub repository page is not finished as it does not contain some APIs, and because of how the code is structured, you might’ve seen some of the unused lines or impractical practice of coding, i do not consider myself as the best so keep this in mind before editing source code of mine or read to modify.

7 Likes

Such helpful and awesome module!, i have a question, does it resizes automatically for any mobile device?

this looks awesome! This could make mobile development a lot less heckish. thanks gamer very cool

It’s based on pixels (or offset) which isn’t automatically resized to fit the screen, i did plan to do this by putting UIAspectRatio or switching to scale but it ends up messing the position and touch pos

I wonder if this could be used to make a dynamic sword which adjusts the height of the hit based on the angle. Not sure if it would feel intuitive enough

you’ve essentially recreated the default Roblox joystick, which, to be completely honest, doesn’t demonstrate any level of originality or innovation. It’s not impressive in any regard, whether it’s in terms of design, functionality, or creativity.

I mean, i don’t really invent the joystick so it functions identically to the default one, this one was rather made as a standalone and i intend to recreate some controls that roblox removed (DPad in this case)

2 Likes