From d6389acf217f01d004fa5ef73229dde152bc50f0 Mon Sep 17 00:00:00 2001 From: Garux Date: Sun, 10 Jun 2018 01:27:49 +0300 Subject: [PATCH] fix TranslateFreeXY_Z usage for entities with non identity origin --- radiant/selection.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/radiant/selection.cpp b/radiant/selection.cpp index 09c9f873..e8d4b7d4 100644 --- a/radiant/selection.cpp +++ b/radiant/selection.cpp @@ -3658,6 +3658,7 @@ void testSelect( const View& view, const Matrix4& pivot2world ){ } else{ /* drag a primitive */ m_dragSelected = true; + test.BeginMesh( g_matrix4_identity, true ); m_freeDragXY_Z.set0( vector4_projected( matrix4_transformed_vector4( test.getScreen2world(), Vector4( 0, 0, booleanSelector.bestIntersection().depth(), 1 ) ) ) ); } } @@ -3684,8 +3685,10 @@ void testSelect( const View& view, const Matrix4& pivot2world ){ m_dragSelected = true; m_freeDragXY_Z.set0( g_vector3_identity ); } - if( bestSelector.bestIntersection().valid() ) + if( bestSelector.bestIntersection().valid() ){ + test.BeginMesh( g_matrix4_identity, true ); m_freeDragXY_Z.set0( vector4_projected( matrix4_transformed_vector4( test.getScreen2world(), Vector4( 0, 0, bestSelector.bestIntersection().depth(), 1 ) ) ) ); + } } for ( SelectionPool::iterator i = selector.begin(); i != selector.end(); ++i )