Changes
Co-authored-by: Reifonas <211114984+Reifonas@users.noreply.github.com>
This commit is contained in:
@@ -87,8 +87,9 @@ export function useControllerGrab() {
|
||||
const gp = source.gamepad;
|
||||
|
||||
if (gp) {
|
||||
const gripBtn = gp.buttons[2];
|
||||
const trigBtn = gp.buttons[1];
|
||||
// xr-standard mapping: [0]=trigger, [1]=squeeze/grip, [2]=touchpad, [3]=thumbstick
|
||||
const trigBtn = gp.buttons[0];
|
||||
const gripBtn = gp.buttons[1];
|
||||
const gripValue = gripBtn ? (gripBtn.value || (gripBtn.pressed ? 1 : 0)) : 0;
|
||||
const trigValue = trigBtn ? (trigBtn.value || (trigBtn.pressed ? 1 : 0)) : 0;
|
||||
slot.gripValue = gripValue;
|
||||
|
||||
Reference in New Issue
Block a user