const { isTouching } = useTouchControls({
onGesture: (gesture) => {
switch (gesture.type) {
case 'tap-forward':
handleTacticalStep('forward'); // 전진보법
break;
case 'hold-forward':
handleContinuousWalk('forward');
break;
case 'two-finger-tap':
activateVitalPointMode();
break;
}
},
enabled: !isPaused,
holdThreshold: 200, // 200ms to distinguish tap from hold
enableHaptics: true,
});
Custom hook for handling touch controls and gesture recognition
Features:
Gesture Mapping: