As a Roblox developer, it is currently impossible to get the gyroscope & accelerometer inputs for gamepads (yes, I am aware that these APIs work for mobile devices).
To get straight to the point, the title says it all.
Some use-cases include tilting the gamepad to control vehicular steering, quickly tilting the controller to jump & avoid obstacles, even controlling the camera’s direction or controlling where the character faces. Feel free to add some use-cases below!
I think this would allow for some really cool creations.
Edit: It turns out some controllers do have gyroscopes, but only DualShock 4 controllers (or PlayStation)
I apologize for the egregious necro-post but it seems like this thread is finally very relevant!
I’m currently working on a cross-platform shooter and I’d love for my mobile gyro aiming controls to be available to PlayStation users! The Nintendo Switch uses this feature for a few games and I’ve been in love with it ever since.
I’ve been playing Roblox and various other games using my PlayStation 5 controller and Steam Deck using gyro via just emulating keyboard inputs, and oh man I would much rather be playing Roblox using it rather than just using sticks to control my camera.
Gyroscope support for games have increased in popularity today than it was 5 years ago. Games such as Fortnite, Call of Duty: MWIII (2023), Call of Duty: Warzone 2, God of War Ragnarok, Genshin Impact, THE FINALS, every Splatoon game, and more have support for gyro-based camera/aiming controls. It would be awesome if there was at least some sort of API to get gyroscope/accelerometer information, so devs could implement their own type of gyroscope implementation, or even optional gyroscope camera controls for every game.
Bumping as we’ve been integrating our own gyro aim for mobile controls we realized that now that PlayStation is a thing and their controllers have gyroscopes.
Analog sticks are great, but terrible for micro adjustments due to precision issues.
Allowing us to tap into gyro controls on non-mobile platforms would give the us the ability to let console players to adequately micro adjust their aim and subsequently improving their experience.
I really hope this gets added soon. Motion -based controls can add a lot to the experience and it is a shame that only mobile has this capability. I believe it is in Roblox’s best interests to expand the user base that can use this gyroscopes/accelerometer beyond just mobile players.
This is an industry standard feature with the exception of Xbox, who have not bothered with many modern features on their controller and whose design has stayed stagnant for the past decade. I understand that gyroscope/accelerometer support for would limit the reach of the feature when it comes to Xbox controller users, but I believe not supporting controllers that can exploit this capability is more limiting.
We already have a GyroscopeEnabled/AccelerometerEnabled boolean properties in UserInputService. I understand that due to the nature of Roblox supporting multiple gamepads, this boolean cannot be used and it is more likely to see a function like UserInputService:HasAccelerometer(gamepad: Enum.UserInputType) being used for this implementation.
I hope Roblox considers adding this very soon. I was excited when I saw GyroscopeEnabled/AccelerometerEnabled and devastated when I realized it won’t work on a controller.
There are a lot of possibilities with a feature like this such as puzzles based on motion sensing. Nobody would be limited as options to use other controls would be supported.