You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Stop motors latching on pause, focus loss, and disconnect (v0.0.12)
Three ways a clip could leave the motors running. All of them are silent on
Sony pads, which decay when they stop receiving output reports, and stick on
XInput, which latches until told otherwise.
Pause: FixedUpdate does not run while Time.timeScale is 0, so a clip pumped
from it parked mid-playback for the whole pause with the motors held at the
last value sent — the stop never got a chance to go out. Fall back to the
Update pump whenever the fixed clock is stopped, keeping fixed-step
alignment whenever it is running. An unscaled clip now plays through the
pause as asked; a timeScale-scaled one keeps ticking at zero intensity so
its silence reaches the hardware. Relatedly, advance the send throttle on
unscaled time: it is a wall-clock cadence, and advancing it on clip time
meant a slowed or paused clip stopped sending anything at all.
Focus loss: stop everything on OnApplicationFocus(false)/OnApplicationPause,
rather than leaving a backgrounded app's controller buzzing.
Disconnect: subscribe to InputSystem.onDeviceChange and drop playback for
removed devices without writing to dead hardware. A reconnect arrives as a
new Gamepad instance, so a stop still keyed to the old one could never land.
Entries are now removed rather than parked on EmptyResponse, so devices that
come and go no longer accumulate stale Gamepad references.
Also adds an opt-in minMotorSpeed floor (default 0, no behaviour change),
remapping non-zero speeds onto [minMotorSpeed, 1] before time scaling. Xbox
ERM motors need roughly 0.1-0.2 before they perceptibly spin and the
crossfade splits amplitude across both, so clips authored against a phone or
DualSense actuator can land under the threshold and feel like nothing fired.