Skip to content

Commit 66e0c62

Browse files
committed
Fix hand model to accomodate changes in the hand tracking API implementation
1 parent 0cc2d2a commit 66e0c62

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/components/hand-tracking-controls.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ var bind = require('../utils/bind');
55
var trackedControlsUtils = require('../utils/tracked-controls');
66
var checkControllerPresentAndSetup = trackedControlsUtils.checkControllerPresentAndSetup;
77

8-
var LEFT_HAND_MODEL_URL = 'https://cdn.aframe.io/controllers/oculus-hands/unity/left.glb';
9-
var RIGHT_HAND_MODEL_URL = 'https://cdn.aframe.io/controllers/oculus-hands/unity/right.glb';
8+
var LEFT_HAND_MODEL_URL = 'https://cdn.aframe.io/controllers/oculus-hands/v3/left.glb';
9+
var RIGHT_HAND_MODEL_URL = 'https://cdn.aframe.io/controllers/oculus-hands/v3/right.glb';
1010

1111
var BONE_PREFIX = {
1212
left: 'b_l_',
@@ -47,14 +47,17 @@ var BONE_MAPPING = {
4747
'thumb-phalanx-proximal': 'thumb2',
4848
'thumb-phalanx-distal': 'thumb3',
4949
'thumb-tip': 'thumb_null',
50+
'index-finger-metacarpal': 'index0',
5051
'index-finger-phalanx-proximal': 'index1',
5152
'index-finger-phalanx-intermediate': 'index2',
5253
'index-finger-phalanx-distal': 'index3',
5354
'index-finger-tip': 'index_null',
55+
'middle-finger-metacarpal': 'middle0',
5456
'middle-finger-phalanx-proximal': 'middle1',
5557
'middle-finger-phalanx-intermediate': 'middle2',
5658
'middle-finger-phalanx-distal': 'middle3',
5759
'middle-finger-tip': 'middle_null',
60+
'ring-finger-metacarpal': 'ring0',
5861
'ring-finger-phalanx-proximal': 'ring1',
5962
'ring-finger-phalanx-intermediate': 'ring2',
6063
'ring-finger-phalanx-distal': 'ring3',
@@ -341,7 +344,7 @@ module.exports.Component = registerComponent('hand-tracking-controls', {
341344

342345
onModelLoaded: function () {
343346
var mesh = this.mesh = this.el.getObject3D('mesh').children[0];
344-
var skinnedMesh = this.skinnedMesh = mesh.children[24];
347+
var skinnedMesh = this.skinnedMesh = mesh.children[30];
345348
if (!this.skinnedMesh) { return; }
346349
this.bones = skinnedMesh.skeleton.bones;
347350
this.el.removeObject3D('mesh');

0 commit comments

Comments
 (0)