From 91b2fb6c1c9f5941cba05ddfcb4442e73a85cbb9 Mon Sep 17 00:00:00 2001 From: KPal <48248865+kpal81xd@users.noreply.github.com> Date: Wed, 23 Oct 2024 18:54:35 +0100 Subject: [PATCH] used camera near plane instead of camera pos for selection (#7059) --- src/extras/gizmo/gizmo.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/extras/gizmo/gizmo.js b/src/extras/gizmo/gizmo.js index 6280b6a12bb..a89831f13a2 100644 --- a/src/extras/gizmo/gizmo.js +++ b/src/extras/gizmo/gizmo.js @@ -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();