Skip to content

Commit

Permalink
Camera: Simplify getWorldDirection(). (mrdoob#26743)
Browse files Browse the repository at this point in the history
* refactor getWorldDirection

* revert object3d
  • Loading branch information
ycw authored Sep 15, 2023
1 parent e6304f3 commit 30164c9
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/cameras/Camera.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,7 @@ class Camera extends Object3D {

getWorldDirection( target ) {

this.updateWorldMatrix( true, false );

const e = this.matrixWorld.elements;

return target.set( - e[ 8 ], - e[ 9 ], - e[ 10 ] ).normalize();
return super.getWorldDirection( target ).negate();

}

Expand Down

0 comments on commit 30164c9

Please sign in to comment.