Part info tooltips now use a raycast to find the selected part being hovered over in the scene.
Part info tooltips now use a raycast to find the selected part being hovered over in the scene.

--- a/KerbalEngineer/Editor/BuildOverlayPartInfo.cs
+++ b/KerbalEngineer/Editor/BuildOverlayPartInfo.cs
@@ -1,7 +1,7 @@
 // 
 //     Kerbal Engineer Redux
 // 
-//     Copyright (C) 2014 CYBUTEK
+//     Copyright (C) 2016 CYBUTEK
 // 
 //     This program is free software: you can redistribute it and/or modify
 //     it under the terms of the GNU General Public License as published by
@@ -12,10 +12,9 @@
 //     but WITHOUT ANY WARRANTY; without even the implied warranty of
 //     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 //     GNU General Public License for more details.
-// 
 //     You should have received a copy of the GNU General Public License
 //     along with this program.  If not, see <http://www.gnu.org/licenses/>.
-// 
+//  
 
 namespace KerbalEngineer.Editor
 {
@@ -102,7 +101,7 @@
                     return;
                 }
 
-                position = GUILayout.Window(GetInstanceID(), position, Window, String.Empty, BuildOverlay.WindowStyle);
+                position = GUILayout.Window(GetInstanceID(), position, Window, string.Empty, BuildOverlay.WindowStyle);
             }
             catch (Exception ex)
 
@@ -131,7 +130,21 @@
                     position.x = Input.mousePosition.x - 3 - position.width;
                 }
 
-                part = EditorLogic.fetch.ship.parts.Find(p => p.HighlightActive) ?? EditorLogic.SelectedPart;
+                RaycastHit rayHit;
+                if (Physics.Raycast(Camera.main.ScreenPointToRay(Input.mousePosition), out rayHit))
+                {
+                    part = rayHit.transform.GetComponent<Part>();
+                }
+                else
+                {
+                    part = null;
+                }
+
+                if (part == null)
+                {
+                    part = EditorLogic.SelectedPart;
+                }
+
                 if (part != null)
                 {
                     if (!part.Equals(selectedPart))