It seems that, conceptually, a Touch ‘Device’ is only momentarily present when a touch is detected. I’m guessing if I touch the screen N times I’d temporarily see N touch devices too.
This works :
let deviceSource: DeviceSource<any> = this.deviceSourceManager.getDeviceSource(DeviceType.Mouse);
if (deviceSource == null) {
deviceSource = this.deviceSourceManager.getDeviceSource(DeviceType.Touch);
}
if (deviceSource == null) {
return;
}
const res = deviceSource.getInput(PointerInput.LeftClick);
Would be great to update the docs to make this explicit, are the docs open source too?