Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix networked-hand-controls issues with aframe-v1.5.0 #451

Conversation

bruce90j
Copy link
Contributor

The networked-hand-controls component doesn't work properly with aframe-v1.5.0:

  1. Hand color is not updated (example: networked-hand-controls="hand:left;color:gold;").
    To make it work replace:

    const handMaterial = newMesh.children[1].material;
    handMaterial.color = new THREE.Color(this.data.color);

    with:

    const handColor = this.data.color;
    newMesh.traverse(function (object) {
        if (!object.isMesh) { return; }
        object.material.color = new THREE.Color(handColor);
    });
    
  2. Hand controller does not work if controllerComponent is not specified (example: networked-hand-controls="hand:right;handModelStyle:controller;").
    Remove 'gearvr-controls', 'daydream-controls' from the controllerComponents list:

    controllerComponents: [
    'magicleap-controls',
    'vive-controls',
    'oculus-touch-controls',
    'windows-motion-controls',
    'hp-mixed-reality-controls',
    // these were missing from the original hand-controls component:
    'valve-index-controls',
    // some older models that it doesn't hurt to include:
    'oculus-go-controls',
    'gearvr-controls',
    'daydream-controls',
    'vive-focus-controls',
    ],

@vincentfretin vincentfretin merged commit 5ccb8af into networked-aframe:master Feb 4, 2024
@vincentfretin
Copy link
Member

Thanks @bruce90j, I also did the change in updateHandMeshColor in 5ccb8af
I tested with WebXR Chrome extension and the following command in the console:
document.querySelector('[networked-hand-controls]').setAttribute('networked-hand-controls', 'color:green')

@vincentfretin
Copy link
Member

This closes #450

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants