HapticService + Spatial Voice = Haptic Service breaking on iOS

Our experience (private, in development) triggers HapticService bumps upon hitting objects in the game with your ball.

Fairly recently, haptics started having issues for one of our places- and only for that PlaceID and only on mobile. Desktop w/ controller (in the same session) with the same codepath works just fine. We have verified we are calling :SetMotor() properly, with no errors, on both platforms in the same way. We have also ran the following code with these results on both platforms:

for _, enum in pairs(Enum.VibrationMotor:GetEnumItems()) do
	print(enum, HapticService:IsMotorSupported(Enum.UserInputType.Gamepad1))
end

--[[ Results:
Enum.VibrationMotor.Large true
Enum.VibrationMotor.Small true
Enum.VibrationMotor.LeftTrigger false
Enum.VibrationMotor.RightTrigger false 
Enum.VibrationMotor.LeftHand false
Enum.VibrationMotor.RightHand false
]]

If we publish the same file (same code, same models) to a different PlaceID, it will work just fine on mobile. It’s only this place ID and on an iPhone 12 Pro / iPhone 14 Pro / iPhone 15 Pro Max that this problem will happen. We have not tested with Android yet, but we will soon as this may be a very important clue if it works just fine on Android.

Symptoms: Haptics work for ~3 seconds and then completely cease to work afterward. Joining the same experience at the same time on desktop w/ controller will work just fine

Devices: iPhone 15 Pro Max / iPhone 14 Pro / iPhone 12 Pro
Link: [Included in staff-only notes]

API:

HapticService:SetMotor(Enum.UserInputType.Gamepad1, Enum.VibrationMotor.Large, 1)
-- As well as
HapticService:SetMotor(Enum.UserInputType.Gamepad1, Enum.VibrationMotor.Small, 1)

This PlaceID happens to be our production environment, so we’d like to keep it without having to move over.

I’m not aware of any place-specific settings related to haptics. And it doesn’t make a lot of sense to me that it works for 3 seconds and then completely turns off. I’ve spent an hour verifying it wasn’t the code. Same exact code works in another place.

Expected behavior

HapticService should work on mobile for more than 3 seconds for this place ID

A private message is associated with this bug report

3 Likes

Can you send both place IDs? I have a theory.

No.

This bug report was forwarded directly to Roblox staff via top dev channels and is not intended for public comment.

Experience is currently unreleased and under NDA. However, we are open to hearing about place-specific settings related to HapticService (there appear to be none).

Ok. By any chance does one place have voice chat enabled whilst the other one doesn’t?

Actually, yes.

The experience where HapticService only works for 3 seconds has microphone support enabled.
Experiences where HapticService works as expected have microphone support disabled.

I’m going to go out on a limb and assume that it takes 3 seconds for voice chat to initialize and break HapticService for mobile.

If it comes down to deciding to choose one or the other, we will likely disable spatial voice in favor of HapticService, as haptics would be turned on for more players than spatial voice when we think about our particular user experience. It is also very common (and perhaps more suitable) to circumvent spatial voice and use Discord or FaceTime among close friends, anyway. At least, for this particular experience. It is a somewhat rare occurrence that players will be near each other

Mhm - that’s probably your issue. I noticed this a few weeks ago and was going to report it but didn’t get around to it. :smile:

Hopefully Roblox can address the issue so you don’t need to disable voice chat at all. Still a bug after all, nonetheless.

I think changing this bug report to be more generalized about HapticService on mobile not working with Spatial Voice enabled might be better suited; it seems like the root cause of the issue. I also don’t believe it’s possible for them to keep Spatial Voice enabled while haptics are available, as the haptic sounds transmit through the microphone causing interference but I’ll let them figure it out.

1 Like

Sorry for the late response here! We’ve found someone for this issue. We’ll get back to you when we have an update.

1 Like