Skip to content

Commit

Permalink
Editor: Make only visible objects Viewport selectable
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed Jul 13, 2021
1 parent 38954ef commit 4c99322
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion editor/js/Viewport.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ function Viewport( editor ) {

raycaster.setFromCamera( mouse, camera );

return raycaster.intersectObjects( objects );
return raycaster.intersectObjects( objects )
.filter( intersect => intersect.object.visible === true );

}

Expand Down

0 comments on commit 4c99322

Please sign in to comment.