Skip to content

Commit

Permalink
used camera near plane instead of camera pos for selection (#7059)
Browse files Browse the repository at this point in the history
  • Loading branch information
kpal81xd authored Oct 23, 2024
1 parent 70e990b commit 91b2fb6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/extras/gizmo/gizmo.js
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ class Gizmo extends EventHandler {
* @private
*/
_getSelection(x, y) {
const start = this._camera.entity.getPosition();
const start = this._camera.screenToWorld(x, y, 0);
const end = this._camera.screenToWorld(x, y, this._camera.farClip - this._camera.nearClip);
const dir = tmpV1.copy(end).sub(start).normalize();

Expand Down

0 comments on commit 91b2fb6

Please sign in to comment.