From 1a70dfac0f833c40b75b4f8c181f149be128f24d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E8=AF=97=E6=B4=A5?= <2723065175@qq.com> Date: Wed, 15 Dec 2021 03:40:53 +0000 Subject: [PATCH] =?UTF-8?q?!1722=20=E6=96=B0=E5=A2=9E:=E6=9E=81=E8=BD=B4?= =?UTF-8?q?=E6=8D=95=E6=8D=89=E5=BC=80=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Editor/SnapServices.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Editor/SnapServices.ts b/src/Editor/SnapServices.ts index 7c7c75de3..eb568cf89 100644 --- a/src/Editor/SnapServices.ts +++ b/src/Editor/SnapServices.ts @@ -75,6 +75,7 @@ export class SnapServices SnapPoint: Vector3;//捕捉到的点 AxisSnapBasePoint: Vector3;//当捕捉模式为轴线捕捉时,返回轴线的基点 SnapModeEnable: ObjectSnapMode = ObjectSnapMode.All; + EnablePolarSnap: boolean = true;//允许极轴捕捉 CustomAxis: Vector3[] = [];//自定义捕捉轴 private _SnapType: ObjectSnapMode = ObjectSnapMode.None;//当前点的捕捉类型 private _DynPrompt: PromptBlock; @@ -480,7 +481,8 @@ export class SnapServices return; let allowMouseDistSq = 100;//允许鼠标距离Sq - let axisVecs = PolarAxis; + let axisVecs: Vector3[] = this.EnablePolarSnap ? PolarAxis : []; + if (this.AxisSnapMode === AxisSnapMode.Ortho) { axisVecs = OrthoAxis;