Browse Source

fix raycasting skinned mesh with morph targets (#22581)

makc 3 years ago
parent
commit
416507dcb8
1 changed files with 1 additions and 1 deletions
  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 );
 		_skinIndex.fromBufferAttribute( geometry.attributes.skinIndex, index );
 		_skinWeight.fromBufferAttribute( geometry.attributes.skinWeight, 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 );
 		target.set( 0, 0, 0 );