Browse Source

SkinnedMesh: Use `getVertexPosition()` in bounding volume methods. (#26913)

Michael Herzog 1 year ago
parent
commit
39db0a40fe
1 changed files with 2 additions and 4 deletions
  1. 2 4
      src/objects/SkinnedMesh.js

+ 2 - 4
src/objects/SkinnedMesh.js

@@ -54,8 +54,7 @@ class SkinnedMesh extends Mesh {
 
 		for ( let i = 0; i < positionAttribute.count; i ++ ) {
 
-			_vertex.fromBufferAttribute( positionAttribute, i );
-			this.applyBoneTransform( i, _vertex );
+			this.getVertexPosition( i, _vertex );
 			this.boundingBox.expandByPoint( _vertex );
 
 		}
@@ -78,8 +77,7 @@ class SkinnedMesh extends Mesh {
 
 		for ( let i = 0; i < positionAttribute.count; i ++ ) {
 
-			_vertex.fromBufferAttribute( positionAttribute, i );
-			this.applyBoneTransform( i, _vertex );
+			this.getVertexPosition( i, _vertex );
 			this.boundingSphere.expandByPoint( _vertex );
 
 		}