From 4abc5ea9395515a3ff0f5b0ae0e24e14436e4aa4 Mon Sep 17 00:00:00 2001 From: Fabien Benetou Date: Mon, 3 Apr 2023 19:44:53 +0200 Subject: [PATCH] fixed wrist attachement with new hand API (1.3 to 1.4) --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 43be5ed..436a450 100644 --- a/index.html +++ b/index.html @@ -930,7 +930,7 @@ AFRAME.registerComponent('wristattachsecondary',{ // localToWorld? (primarySide == 0) ? secondarySide = 1 : secondarySide = 0 var worldPosition=this.worldPosition; - this.el.object3D.traverse( e => { if (e.name == "b_"+sides[secondarySide][0]+"_wrist") { + this.el.object3D.traverse( e => { if (e.name == "wrist") { worldPosition.copy(e.position);e.parent.updateMatrixWorld();e.parent.localToWorld(worldPosition) rotation = e.rotation.x*180/3.14 + " " + e.rotation.y*180/3.14 + " " + e.rotation.z*180/3.14 this.data.target.setAttribute("rotation", rotation)