Skip to content
This repository was archived by the owner on Aug 21, 2024. It is now read-only.

Commit 6501e4f

Browse files
authored
Fix normalization function (#7927)
1 parent e5b1652 commit 6501e4f

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

  • packages/client-core/src/common/components/TouchGamepad

packages/client-core/src/common/components/TouchGamepad/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ const triggerButton = (button: ButtonTypes, pressed: boolean): void => {
1919
}
2020

2121
const normalizeValues = (val) => {
22-
const a = 1
23-
const b = -1
22+
const a = 5
23+
const b = -5
2424
const maxVal = 50
2525
const minVal = -50
2626

@@ -36,6 +36,7 @@ const handleMove = (e) => {
3636
value: { x: normalizeValues(-e.x), y: normalizeValues(e.y), angleRad: 0 }
3737
}
3838
})
39+
3940
document.dispatchEvent(event)
4041
}
4142

0 commit comments

Comments
 (0)