;
            mesh.updateMatrixWorld();

            const headQuaternionInverse = localQuaternion2.copy(mesh.head.quaternion).inverse();
            uniforms.headRotation.value.set(headQuaternionInverse.x, headQuaternionInverse.y, headQuaternionInverse.z, headQuaternionInverse.w);

            for (let i = 0; i < 2; i++) {
              const armRotation = uniforms[i === 0 ? 'leftArmRotation' : 'rightArmRotation'];

              const gamepad = gamepads[i];
              if (gamepad.visible) {
           