소스 검색

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 3 년 전
부모
커밋
a7863bd6d2
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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 );