Explorar o código

Example: Orient objects normal to hittest in webxr_ar_hittest (#23573)

* Orient objects normal to hittest in example

* Update webxr_ar_hittest.html

Co-authored-by: mrdoob <[email protected]>
Alexandre Devaux %!s(int64=3) %!d(string=hai) anos
pai
achega
a7863bd6d2
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      examples/webxr_ar_hittest.html

+ 1 - 1
examples/webxr_ar_hittest.html

@@ -76,7 +76,7 @@
 
 						const material = new THREE.MeshPhongMaterial( { color: 0xffffff * Math.random() } );
 						const mesh = new THREE.Mesh( geometry, material );
-						mesh.position.setFromMatrixPosition( reticle.matrix );
+						reticle.matrix.decompose( mesh.position, mesh.quaternion, mesh.scale );
 						mesh.scale.y = Math.random() * 2 + 1;
 						scene.add( mesh );