Browse Source

fix raycasting skinned mesh with morph targets (#22581)

makc 4 năm trước cách đây
mục cha
commit
416507dcb8
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/objects/SkinnedMesh.js

+ 1 - 1
src/objects/SkinnedMesh.js

@@ -123,7 +123,7 @@ class SkinnedMesh extends Mesh {
 		_skinIndex.fromBufferAttribute( geometry.attributes.skinIndex, index );
 		_skinWeight.fromBufferAttribute( geometry.attributes.skinWeight, index );
 
-		_basePosition.fromBufferAttribute( geometry.attributes.position, index ).applyMatrix4( this.bindMatrix );
+		_basePosition.copy( target ).applyMatrix4( this.bindMatrix );
 
 		target.set( 0, 0, 0 );