This commit is contained in:
[Valentino Heman Budiarto]
2026-10-27 19:08:37 +07:00
parent 27a2909ade
commit 20f5628af8
+2 -1
View File
@@ -231,7 +231,8 @@ export default function RobotDashboard() {
setGpVisuals({ lt: gpLT, rt: gpRT, steer: gpSteer, btnA: gpA, btnB: gpB, btnX: gpX, btnY: gpY });
}
} else if (controlMode === 'pc-mobile') {
currentY = (keysRef.current.down ? 1 : 0) - (keysRef.current.up ? -1 : 0);
// W (up) menghasilkan 1, S (down) menghasilkan -1
currentY = (keysRef.current.up ? 1 : 0) - (keysRef.current.down ? 1 : 0);
currentX = (keysRef.current.right ? 1 : 0) - (keysRef.current.left ? 1 : 0);
}