Designing recoil Haptics in Unity
A well-designed recoil rumble pattern reads as a short repeating kick — each shot triggers a brief strong-motor pulse, with the spacing following the weapon fire rate. The reason this shape works is that consistency matters: identical pulses per trigger pull make the weapon feel mechanical; add slight amplitude falloff on sustained fire.
When to use it: best on semi-auto or burst weapons, where every trigger press maps to exactly one visible kick. Tuning notes: Recoil is the effect where feel is decided by the cadence between pulses more than by the pulse shape itself. A full-auto weapon should modulate its kick amplitude slightly with each shot — a perfectly identical pulse train feels like a washing machine, not a weapon. The weak motor adds nothing on most guns and is better saved for a directional kick if the game supports it. Fire-rate changes during gameplay (like a rate-of-fire buff) should retime the pulses from the weapon state, not from a fixed interval you tuned in isolation.
Engine integration
In Unity, Unity exposes both motors through Gamepad.SetMotorSpeeds every frame; drive them from a coroutine that samples the waveform at fixed intervals instead of hardcoding one-shot values. For the recoil pattern specifically, for a {effect} curve, step the coroutine along the envelope so the attack/decay shape survives gameplay pacing changes. Unity's gamepad writes are per-frame and CPU-cheap, but be careful about driving SetMotorSpeeds from Update() when the game is paused — pausing freezes the envelope unless you sample against Time.unscaledTime, so clock the coroutine on unscaled time for effects that must survive a pause menu.
Unity's strength is cross-platform reach: the same SetMotorSpeeds call works on Windows, macOS, Android and consoles through the native gamepad backend, so your {effect} effect ships everywhere with one coroutine. The trade-off is that platform quirks live in the Input System layer — on Windows the legacy Input Manager and the new Input System package expose the same motor writes through different entry points, so pick one and keep the whole envelope in that system. Because the loop runs at frame rate, an explosion sampled at 30fps needs the same keyframes as one at 120fps; sample by unscaled time, never by frame count, or the feel drifts between quality presets.
Haptic feedback bridges the gap between digital interaction and physical sensation. Matching the visual and auditory cues with the tactile response is what makes the effect feel intentional rather than decorative.