[Studio Beta] Introducing New Haptics Effects and APIs

Is this only for gamepad controllers or it is also for touchscreen mobile devices?

3 Likes

Do we get particle emitter collision as well?

4 Likes

Finally. Good Haptics. This is actually so cool, because I don’t have to link Every. Single. UI Element. to my modulescript!

3 Likes

Roblox supports haptics for the following devices:

  • Android and iOS phones supporting haptics including most iPhone, Pixel, and Samsung Galaxy devices
  • PlayStation gamepads
  • Xbox gamepads
  • Quest Touch controller
5 Likes

trying to test with a xbox controller connected wirelessly to windows 10 and theres no haptics, am i missing something?

4 Likes

We’re eating good tonight - damn well brilliant job done

3 Likes

Hi @a19_9
Can you make sure you enable haptics beta feature under File → BetaFeatures ? If it still doesn’t work for you. Do you mind sending us any logs and machine specs so we can take a look? Thanks!

1 Like

I tried it with a controller, and it’s a great update. I’ve always been interested in vibrations in games, they have an incredible impact on the gaming experience. Will Haptic Feedback and Adaptive Triggers be supported in the future? Haptic Feedback and Adaptive Triggers improve the gaming experience incredibly.

Also, I couldn’t figure out how to try it on phone. How can I create or connect to a local server on my phone?

6 Likes

Thanks for trying out haptics! You’ll be able to test on mobile devices once we release our client beta – for now emulation needs to be hooked up to your Studio build. Stay tuned :slight_smile:

3 Likes

OMG FINALLY!!! This will be so useful in my racing game :smiley:

1 Like

Seems promising, but it’ll without a doubt be used wrongly :joy:

VR games when it comes to physical touches and contact with other users through vibrations, or it being overly used by Simulators or other kind of ‘stimulators’.

Are users given the option to disable haptics / haptic feedback via their ROBLOX dropdown menu? :thinking:

4 Likes

There is already a setting to disable on phone, only visible on phone though. I think any device with haptic has it.

1 Like

make sure you have haptics enabled in your roblox settings, for me it was disabled by default

Here it is, I forgot to attach image before.

I think it would be good to have a feedback thing for a down vote. Maybe downvote option could be “excessive haptics”, I do like some vibration but there will probably be a game out there using way too much haptic. I don’t want to turn on and off haptics for specific games and would like to just keep it on but games should not have too much ye.

2 Likes

Thanks for the image!
Agreed and glad there’s a way to turn it off. Obviously some games may see individual settings, but can’t count on that

1 Like

made this, used this for testing, and making my own curves

(DOWNLOAD OPTION BELOW)

I made this cause I really wanted to test every option from effectCustom.Position and effectCustom.Radius to see how they feels different and what they actually do. But I hated to having to edit the script, disable it, then enable it again just for check the effect. So yeah, I kinda just came up with this idea for test every HapticEffect.Position and HapticEffect.Radius I wanted without going through all that mess

Tested using a Robot White – Xbox Series X|S controller and this PowerA Spectra Infinity xbox series S|X

This isnt meant to work with VR or mobile devices since I feel controllers are the best option for trying out the haptic feature.

So if you’re like using a PS5 controller and its not working or whatever, just let me know. I didnt really have a way to test if it actually works on ps5, but like I think I dont need to change Enum.KeyCode or anything in UserInputService to make it work But idk lol


image
image

All the properties: radius, vector space to test a bigger area, testing out custom haptic effects, sending a vibration, or just like applying a general haptic effect, it can all be done straight from the gamepad. No need to take your hands off the controller or anything, which uhh was kinda driving me crazy cause I just could not deal with that. So yeah, thats also why I made this


.RBXL Download:
hapticX v1.1.rbxl (90.0 KB)


VIDEO

not sure if the video is gonna play, its probably better to just try it out yourself anyway

thats all. Hope this helps to understand haptic design using the new api like it did for me :cake::cherries:

14 Likes

That’s Amazing! :smiley: The link doesn’t work though, but even if it did it wouldn’t work since Roblox Studio changed/updated preventing me from launching any saved experiences on my pc.

Side note for PS5 controllers, it was a sad day (No Haptic-Feedback :frowning: ). From my experience, you can’t even control the intensity, it’s just Big Rumble Left | Small Rumble Right. Other than that, the Motors are practically in the same spot of any Controller. And PS4 is using same Rumble as Xbox.

:exclamation: Edit: The link does work, and the studio launching issue has been fixed.

1 Like

So, does this mean we’ll be getting adaptive triggers for the ps5 soon?

5 Likes

I’m having difficulty migrating my current implementation to this new system. It’s both more complex (curves, radius, & position) and more simple (HapticEffectType).

This is how I currently set things, there’s a remote event I call that passes params:

if isHapticFeedbackEnabled == true then
	HapticService:SetMotor(Enum.UserInputType.Gamepad1, whatMotorShouldBeMoving, howIntenseShouldTheRumbleBe)
	task.wait(howLongShouldTheRumbleLast)
	HapticService:SetMotor(Enum.UserInputType.Gamepad1, whatMotorShouldBeMoving, 0)
end

I’m confused about how I might target a specific motor now, not that I necessarily need to. I’m just used to how the old system worked, and it’s difficult to switch to that throughout my game. It is a different approach to haptics, so it makes sense. I guess trial and error will get me there. The GameplayCollision would be most helpful for me, as my custom character often rams into rocks to break them, though I may tweak it with Custom.

On another note, as shown in my code, I use an isHapticFeedbackEnabled variable that I set through a custom settings menu in my game. Roblox between Jan 2024 and now Roblox has released an option in the Roblox Settings Menu:

I assume Roblox internally cuts Haptics working for both this (HapticsEffects) and the HapticFeedbackService. Now, I’d assume it’d be better for performance purposes or just readability to be able to just not run my code if the player turns off Haptics. In short, I’d like a way to know if the player toggles Haptics. There’s nothing in UserGameSettings (used to tell devs user settings to an extent) or HapticService.

The introduction of the option by Roblox makes my toggle redundant, but I can’t tap into it to properly remove it.


Edit:

Here my entire code (local script under StarterGui)
-- MY custom Settings Menu Toggle: --
local UseHapticFeedback = game.Workspace.RemoteEventsFolder.UseHapticFeedback
local toggle_isHapticFeedbackEnabled_RemoteEvent = game.Workspace.RemoteEventsFolder.OptionsMenuToggles.ToggleHapticFeedbackSetting

-- Rest of the code:
local isHapticFeedbackEnabled = true
local useNewHapticEffectSystem = true -- see this: https://devforum.roblox.com/t/studio-beta-introducing-new-haptics-effects-and-apis/3606858
if useNewHapticEffectSystem then	
	UseHapticFeedback.OnClientEvent:Connect(function(whatMotorShouldBeMoving,howLongShouldTheRumbleLast,howIntenseShouldTheRumbleBe)
		local hapticEffectInstance = Instance.new("HapticEffect")
		hapticEffectInstance:Play()
		-- now I need to pass along different params for position?
		-- radius can be intensity
		-- how long can be, well, maybe looping and Play() and Stop() but should prob something else?
	end)
else 
	local HapticService = game:GetService("HapticService")
	UseHapticFeedback.OnClientEvent:Connect(function(whatMotorShouldBeMoving,howLongShouldTheRumbleLast,howIntenseShouldTheRumbleBe)
		if isHapticFeedbackEnabled == true then
			HapticService:SetMotor(Enum.UserInputType.Gamepad1, whatMotorShouldBeMoving, howIntenseShouldTheRumbleBe)
			task.wait(howLongShouldTheRumbleLast)
			HapticService:SetMotor(Enum.UserInputType.Gamepad1, whatMotorShouldBeMoving, 0)
		end

	end)
end

toggle_isHapticFeedbackEnabled_RemoteEvent.OnClientEvent:Connect(function(toggleState)
	isHapticFeedbackEnabled = toggleState
end)
3 Likes

I test it on both Xbox and Ps5 controller, the Xbox wasn’t able to navigate the UI without mouse interception although the Ps5 was but the Xbox byfar has better haptic controls. I noticed a comparable difference in the the higher rumbles compared to the lower.

The Ps5 felt like there was a difference but low rumble still felt like higher where as Xbox you can definitely feel the difference between high and low.

2 Likes