Skip to content

Commit

Permalink
SkinnedMesh: Use getVertexPosition() in bounding volume methods. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Mugen87 committed Oct 7, 2023
1 parent f7b0c24 commit 39db0a4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/objects/SkinnedMesh.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 );

}
Expand All @@ -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 );

}
Expand Down

0 comments on commit 39db0a4

Please sign in to comment.