Flint Engine
Modular C++20 2D game engine powered by SDL3
Loading...
Searching...
No Matches

◆ rumble()

void Flint::InputManager::rumble ( float lowFrequencyStrength,
float highFrequencyStrength,
Uint32 durationMs )

Trigger a rumble effect on the active gamepad.

Clamps both strength parameters to [0, 1], converts to the 16-bit range expected by SDL, and invokes the SDL rumble API. No-op if g_gamepad is nullptr.

Parameters
lowFrequencyStrengthIntensity of the low-frequency motor in [0, 1].
highFrequencyStrengthIntensity of the high-frequency motor in [0, 1].
durationMsDuration in milliseconds.