Skip to content
This repository was archived by the owner on Jan 31, 2026. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions bHapticsManager/ModernBHapticsWorkerThread.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,17 @@ private class HapticPointData(HapticPoint point) {
public float VibrationPhi { get; set; }
}

// Worker thread update rate: 8ms = 125 Hz
// Reduced from 10ms (100 Hz) to 8ms for smoother haptic feedback and better temporal resolution.
// Higher update rates provide more responsive haptic effects, particularly for fast-changing
// sensations like vibration and pain pulses.
private const int UPDATE_INTERVAL_MS = 8;

// Haptic frame duration: how long each submitted frame persists on the device
// Increased from 40ms to 100ms to ensure smooth overlap between frames and prevent gaps.
// The 100ms duration (with 8ms updates) provides ~12.5x frame overlap, creating seamless
// haptic transitions. Too short a duration can cause perceptible stuttering or dropouts,
// while too long can reduce responsiveness to rapid intensity changes.
private const int SUBMISSION_DURATION_MS = 100;

private readonly InputInterface _inputInterface;
Expand Down