Repository navigation
feat(vr): implement OpenXR controller haptics and bypass mobile suppr… - #22
Merged
Merged
Conversation
…ession - Implement RobloxHapticProtocolBridge for MessageBus HapticProtocol (SupportsHaptics, GetMotors, SetMotorState, UpdateSingletonVibration). - Wire bridge into RobloxExperienceComposition and direct game runtime. - Call JNI NativeGLInterface.nativeUpdateMobileHapticsState during startup and game completion. - Enable FFlagKeepHapticsOnMobileWhenGamepadConnected and FFlagVRHaptics in VR client settings overrides to bypass gamepad haptic suppression in libroblox. - Directly activate KeepHaptics and VRHaptics fast flag bytes in memory within RobloxVrDeviceBridge::Activate for builds 2998 and 3222. - Check xrApplyHapticFeedback result code and add diagnostic logging.
…ting - Register HapticProtocol and report motors only when MOCKTAIL_VR_ENABLED is on. - Drop the per-message [haptic] dispatch log; log each OpenXR haptic result once per hand. - Write a fast flag only when its name pointer matches the expected name. - Remove the state-sync fallback that dlsym can never resolve.
… of pinning it The Vulkan adapter exports vk* symbols globally, so a runtime loaded again after it bound its Vulkan calls to the adapter and deadlocked the join. Pinning avoided the reload but left SteamVR with its old VkInstance, which aborted the join with "vkGetInstanceProcAddr: Invalid instance". Later instances now load the runtime libraries with RTLD_DEEPBIND and let them unload with their instance.
…m them The Android client drops HapticService:SetMotor on the Gamepad1 LeftHand and RightHand motors: its haptics backend only consumes Large and Small. VR games such as VR Hands drive those motors, so they never vibrated. - Interpose HapticService::SetMotor through its reflection descriptor, call the original, and forward Gamepad1 LeftHand/RightHand to OpenXR. The descriptor and the engine's intensity reader are found by pattern at load, for both the 2998 (tuple span) and 3222 (shared tuple) reader ABIs. The held level renews a 50 ms lease every presented frame. - Report the hand motors at x = -1/+1 in GetMotors. Positional HapticEffects aim at a hand there with a 0.5 radius (VOXEL DESTRUCT 2 does), so at +-0.2 every effect mixed to zero. - Play SetMotorState buffers sample by sample with trailing silence trimmed. Roblox sends 100 x 25 ms look-ahead buffers; taking the peak for the whole buffer turned a short bump into 2.5 s at full strength. - Stop vibrating from the DebugDeviceVR haptic slot. The engine pulls it every frame but with each mix buffer's first sample, held about a second, so it duplicated the buffers as a long buzz. - Enable SupportGenericHapticsOnVR and FixRegisterMotors with the other haptic flags.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…ession
Closes #