aframe-motion-capture-components icon indicating copy to clipboard operation
aframe-motion-capture-components copied to clipboard

Motion-Capture-Components not working with aframe 0.9.0 (Cannot read property 'updateControllerList' of undefined)

Open Wavewash opened this issue 5 years ago • 4 comments

When running with a-frame 0.9.0 I'm presented with this error:

aframe-motion-capture-components.js:1327 Uncaught TypeError: Cannot read property 'updateControllerList' of undefined at o.init (aframe-motion-capture-components.js:1327) at o.module.exports.System (system.js:42) at new o (system.js:147) at HTMLElement.value (a-scene.js:184) at HTMLElement.value (a-scene.js:173) at HTMLElement.value (a-scene.js:102) at HTMLElement.value (a-register-element.js:160)

in https://unpkg.com/aframe-motion-capture-components/dist/aframe-motion-capture-components.js on line 1327:

 // Wrap `updateControllerList`.
	    this.updateControllerListOriginal = trackedControlsSystem.updateControllerList.bind(
	      trackedControlsSystem);

It's complaining that this.updateControlelrListOriginal is undefined. Going a little further up to line 1320:

trackedControlsSystem = sceneEl.systems['tracked-controls'];
trackedControlsTick = AFRAME.components['tracked-controls'].Component.prototype.tick;

Inspecting here I found sceneEl.systems['tracked-controls'] doesn't exist but looking at sceneEl.systemNames I could see:

(9) ["camera", "geometry", "gltf-model", "light", "material", "renderer", "shadow", "tracked-controls-webvr", "tracked-controls-webxr"]

we do have "tracked-controls-webvr" and "tracked-controls-webxr"

I've put together a glitch to show the problem: https://glitch.com/edit/#!/past-lasher

Thanks for all your work!

Wavewash avatar Mar 14 '19 03:03 Wavewash

For anyone that this may help, I was able to attain passable head movement from the recording with minor visual glitches by replacing tracked-controls with tracked-controls-webxr, however hand models are not appearing. I'll keep playing with it, but if anyone else wants to take a stab at this that would be awesome. This lib is too useful!!

JakeCasey avatar Oct 09 '19 18:10 JakeCasey

I got a little further by forcing visibility of replayed elements, as I believe Aframe default hides controllers if they aren't connected. Though I don't know if this is ideal because maybe elements that are being replayed shouldn't always be visible? It should be as close to the replay as possible, obviously.

     log('Setting motion-capture-replayer on ' + key + '.');
            replayingEl.setAttribute('motion-capture-replayer', {
              loop: data.loop,
            });

            // Force element to be visible
            replayingEl.setAttribute('visible', 'true');

            replayingEl.components['motion-capture-replayer'].startReplaying(
              replayData[key],
            );

Hopefully this helps someone who's just trying to get by! Still some major visual glitches I think being caused by two replays starting at the same time? I'll keep testing.

JakeCasey avatar Oct 09 '19 23:10 JakeCasey

I have the same error :

Uncaught TypeError: Cannot read property 'updateControllerList' of undefined

and I just have this code super simple:

https://gist.github.com/SaulBurgos/6c33e4dd053f1912318ca8691865f46f

image

Any idea?

SaulBurgos avatar Nov 29 '19 00:11 SaulBurgos

Is this still not resolved? It's basically unusable :(

han-steve avatar May 08 '21 19:05 han-steve