diff --git a/CHANGELOG.md b/CHANGELOG.md index 22b6dba09..a4f9e6402 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Fixed +- Fixed a bug where in the TextureMoveTool, a snapping of 1.0f was applied to handle movement before the actual snapping is applied - [PBLD-240] Fixed a bug where buttons for "Create Cube" and "Create PolyShape" appeared incorrectly on Light theme. - [PBLD-258] Fixed an bug where clicking a highlighted edge might select a hidden edge instead. - [PBLD-262] Fixed a bug in the deep cycling of face selection where faces from hidden meshes would get prioritized diff --git a/Editor/EditorCore/TextureMoveTool.cs b/Editor/EditorCore/TextureMoveTool.cs index 8228767e3..aeb2c90ab 100644 --- a/Editor/EditorCore/TextureMoveTool.cs +++ b/Editor/EditorCore/TextureMoveTool.cs @@ -39,7 +39,6 @@ protected override void DoToolGUI() { if (!isEditing) m_Position = Vector3.zero; - EditorHandleUtility.PushMatrix(); Handles.matrix = Matrix4x4.TRS(m_HandlePosition, m_HandleRotation, Vector3.one); @@ -48,22 +47,26 @@ protected override void DoToolGUI() Handles.color = Color.blue; + // Disable Snap for the individual handles. Snap is applied if movement is detected. + const float SnapFactor = 0.0f; + var handleSize = HandleUtility.GetHandleSize(m_Position); + m_Position = Handles.Slider2D(m_Position, Vector3.forward, Vector3.right, Vector3.up, - HandleUtility.GetHandleSize(m_Position) * .2f, + handleSize * .2f, Handles.RectangleHandleCap, - 0f, + SnapFactor, false); Handles.color = Color.green; - m_Position = Handles.Slider(m_Position, Vector3.up); + m_Position = Handles.Slider(m_Position, Vector3.up, handleSize, Handles.ArrowHandleCap, SnapFactor); Handles.color = Color.red; - m_Position = Handles.Slider(m_Position, Vector3.right); + m_Position = Handles.Slider(m_Position, Vector3.right, handleSize, Handles.ArrowHandleCap, SnapFactor); Handles.color = Color.white;