From b2f49dff6f7cfc3a54aff284c610498c4aa18554 Mon Sep 17 00:00:00 2001 From: "joelle.mcduff" Date: Tue, 17 Feb 2026 14:58:59 -0500 Subject: [PATCH 1/5] Stop spamming LookRotation log --- Editor/EditorCore/DrawShapeTool.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Editor/EditorCore/DrawShapeTool.cs b/Editor/EditorCore/DrawShapeTool.cs index 1cf259414..4fcf39a55 100644 --- a/Editor/EditorCore/DrawShapeTool.cs +++ b/Editor/EditorCore/DrawShapeTool.cs @@ -868,7 +868,7 @@ internal void DoDuplicateShapePreviewHandle(Vector3 position) m_Bounds.center = cornerPosition + new Vector3(size.x / 2f, 0, size.z / 2f) + (size.y / 2f) * m_Plane.normal; var lastPreviewRotation = m_PlaneRotation; - m_PlaneRotation = Quaternion.LookRotation(m_PlaneForward, m_Plane.normal); + m_PlaneRotation = m_PlaneForward.magnitude == 0 ? Quaternion.identity : Quaternion.LookRotation(m_PlaneForward, m_Plane.normal); var forceRebuildPreview = !m_PlaneRotation.Equals(lastPreviewRotation) || m_LastPreviewPivotLocation != pivotLocation; m_LastPreviewPivotLocation = pivotLocation; @@ -919,7 +919,7 @@ internal void DoDuplicateShapePreviewHandle(Vector3 position) pivot += .5f * size.y * m_Plane.normal; else pivot = previewPivotPosition; - m_DuplicateGO.transform.SetPositionAndRotation(pivot, Quaternion.LookRotation(m_PlaneForward, m_Plane.normal)); + m_DuplicateGO.transform.SetPositionAndRotation(pivot, m_PlaneRotation); DrawBoundingBox(preview_BB_Origin, preview_BB_HeightCorner, preview_BB_OppositeCorner, false); } From 6df2035b8a3fb5576d59dc69b2b6d6df4e86b24c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABlle=20McDuff?= Date: Tue, 17 Feb 2026 15:34:52 -0500 Subject: [PATCH 2/5] Add changelog entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f015967f..033dcf069 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - [PBLD-284] Fixed InstanceID obsolescence warning appearing on 6000.4 and newer versions. - Fixed an issue where a proper unique name wasn't set on duplicated ProBuilder meshes. - [UUM-133756] Fixed the help icon for ProBuilder components pointing to the wrong documentation link. It now points to https://docs.unity3d.com/Packages/com.unity.probuilder@latest. +- [UUM-133861] Fixed "Look rotation viewing vector is zero" log being spammed when holding shift while using a create tool such as Create Sprite. ## [6.0.8] - 2025-11-17 From 6165917c7842a627256318b190bec7d10defd33f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABlle=20McDuff?= Date: Wed, 18 Feb 2026 14:15:24 -0500 Subject: [PATCH 3/5] Fix changelog entry --- CHANGELOG.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 033dcf069..6a8789c87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## Unreleased + +### Fixed + +- [UUM-133861] Fixed "Look rotation viewing vector is zero" log being spammed when holding shift while using a create tool such as Create Sprite. + ## [6.0.9] - 2026-01-30 ### Fixed @@ -14,7 +20,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - [PBLD-284] Fixed InstanceID obsolescence warning appearing on 6000.4 and newer versions. - Fixed an issue where a proper unique name wasn't set on duplicated ProBuilder meshes. - [UUM-133756] Fixed the help icon for ProBuilder components pointing to the wrong documentation link. It now points to https://docs.unity3d.com/Packages/com.unity.probuilder@latest. -- [UUM-133861] Fixed "Look rotation viewing vector is zero" log being spammed when holding shift while using a create tool such as Create Sprite. ## [6.0.8] - 2025-11-17 From 45c3671ecee84ddd11171075891cbc850abc8fd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABlle=20McDuff?= Date: Wed, 18 Feb 2026 15:51:23 -0500 Subject: [PATCH 4/5] Improve zero magnitude check and apply fix to other instance --- Editor/EditorCore/DrawShapeTool.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Editor/EditorCore/DrawShapeTool.cs b/Editor/EditorCore/DrawShapeTool.cs index 4fcf39a55..35f24b0fe 100644 --- a/Editor/EditorCore/DrawShapeTool.cs +++ b/Editor/EditorCore/DrawShapeTool.cs @@ -868,7 +868,7 @@ internal void DoDuplicateShapePreviewHandle(Vector3 position) m_Bounds.center = cornerPosition + new Vector3(size.x / 2f, 0, size.z / 2f) + (size.y / 2f) * m_Plane.normal; var lastPreviewRotation = m_PlaneRotation; - m_PlaneRotation = m_PlaneForward.magnitude == 0 ? Quaternion.identity : Quaternion.LookRotation(m_PlaneForward, m_Plane.normal); + m_PlaneRotation = Mathf.Approximately(m_PlaneForward.sqrMagnitude, 0f) ? Quaternion.identity : Quaternion.LookRotation(m_PlaneForward, m_Plane.normal); var forceRebuildPreview = !m_PlaneRotation.Equals(lastPreviewRotation) || m_LastPreviewPivotLocation != pivotLocation; m_LastPreviewPivotLocation = pivotLocation; @@ -943,7 +943,7 @@ void RecalculateBounds() if(Mathf.Abs(m_Bounds.center.y) < 0.0001f) m_Bounds.center = m_Bounds.center + 0.0001f * Vector3.up; - m_PlaneRotation = Quaternion.LookRotation(m_PlaneForward,m_Plane.normal); + m_PlaneRotation = Mathf.Approximately(m_PlaneForward.sqrMagnitude, 0f) ? Quaternion.identity : Quaternion.LookRotation(m_PlaneForward, m_Plane.normal); } internal void RebuildShape() From d2aa38a9800b3358f681a7ee119aaa926793cb60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABlle=20McDuff?= Date: Wed, 18 Feb 2026 16:10:38 -0500 Subject: [PATCH 5/5] Move fix in UpdatePlaneRotation() method --- Editor/EditorCore/DrawShapeTool.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Editor/EditorCore/DrawShapeTool.cs b/Editor/EditorCore/DrawShapeTool.cs index 35f24b0fe..8ad2c37e2 100644 --- a/Editor/EditorCore/DrawShapeTool.cs +++ b/Editor/EditorCore/DrawShapeTool.cs @@ -844,6 +844,11 @@ internal void SetBounds(Vector3 size) m_BB_HeightCorner = m_BB_Origin + size; } + void UpdatePlaneRotation() + { + m_PlaneRotation = Mathf.Approximately(m_PlaneForward.sqrMagnitude, 0f) ? Quaternion.identity : Quaternion.LookRotation(m_PlaneForward, m_Plane.normal); + } + internal void DoDuplicateShapePreviewHandle(Vector3 position) { var evt = Event.current; @@ -868,7 +873,7 @@ internal void DoDuplicateShapePreviewHandle(Vector3 position) m_Bounds.center = cornerPosition + new Vector3(size.x / 2f, 0, size.z / 2f) + (size.y / 2f) * m_Plane.normal; var lastPreviewRotation = m_PlaneRotation; - m_PlaneRotation = Mathf.Approximately(m_PlaneForward.sqrMagnitude, 0f) ? Quaternion.identity : Quaternion.LookRotation(m_PlaneForward, m_Plane.normal); + UpdatePlaneRotation(); var forceRebuildPreview = !m_PlaneRotation.Equals(lastPreviewRotation) || m_LastPreviewPivotLocation != pivotLocation; m_LastPreviewPivotLocation = pivotLocation; @@ -943,7 +948,7 @@ void RecalculateBounds() if(Mathf.Abs(m_Bounds.center.y) < 0.0001f) m_Bounds.center = m_Bounds.center + 0.0001f * Vector3.up; - m_PlaneRotation = Mathf.Approximately(m_PlaneForward.sqrMagnitude, 0f) ? Quaternion.identity : Quaternion.LookRotation(m_PlaneForward, m_Plane.normal); + UpdatePlaneRotation(); } internal void RebuildShape()