Open filandra opened 4 months ago
Hey, thanks for reporting the issue, I'll check it out!
I'm having trouble reproducing the issue with 1.6.0, any code sample/glitch that could help me out? I'm trying with my visual debug (but with the version bumped up).
Hmm I actually can't replicate the issue using the visual debug as well. I will write a simple demonstrator and get back to you. Perhaps the issue is actually in A-Frame, because I encounter the bug after using some vector math on the data from hand-tracking-extras.
That would be great! I'll also try to bump my stuff to 1.6 or master and maybe something will pop up
I finally got to write the demonstrator - sorry for the delay:
AFRAME.registerComponent("version-test", {
init() {
this.ringHolder = document.createElement("a-entity");
this.el.appendChild(this.ringHolder);
this.ring = document.createElement("a-torus");
this.ring.setAttribute("color", "green");
this.ring.setAttribute("radius", 0.045);
this.ring.setAttribute("radius-tubular", 0.0005);
this.ringHolder.appendChild(this.ring);
this.onHandTrackingLoaded = this.onHandTrackingLoaded.bind(this);
this.el.addEventListener(
"hand-tracking-extras-ready",
this.onHandTrackingLoaded
);
},
onHandTrackingLoaded(evt) {
this.jointAPI = evt.detail.data.jointAPI;
},
moveRing() {
this.indexBone.getPosition(this.ringHolder.object3D.position);
this.indexBone.getQuaternion(this.ring.object3D.quaternion);
},
tick() {
if (!this.jointAPI) return;
if (!this.indexBone)
this.indexBone = this.jointAPI.getIndexIntermediate();
this.moveRing();
},
});
<a-entity
id="rightHand"
hand-tracking-controls="hand: right;"
hand-tracking-extras
foo
version-test
>
Version 1.5:
Version 1.6:
Still not sure if the issue is in A-Frame, hand-tracking-extras or perhaps I'm doing something wrong in the demonstrator.
When using A-Frame 1.6, the coordinates of joints are shifted and do not correspond to the real life counterparts at all. This issue is not present in A-Frame 1.5.