/// <summary> /// Check if we hit the handles /// </summary> /// <param name="x"></param> /// <param name="y"></param> /// <param name="viewport"></param> /// <returns></returns> private int GetGrableHandleHit(int x, int y, BaseViewport viewport) { MapObjectGroup selectedMapObjectGroup = controller.Selection; if (selectedMapObjectGroup.Empty) { return((int)SolidGrabHandles.HitStatus.None); } Matrix4 toGridMatrix = viewport.Camera.GetWorldMatrix().ClearTranslation(); SolidGrabHandles handles = controller.RubberBand.Handles; handles.CreateHandles(selectedMapObjectGroup, toGridMatrix, viewport.Zoom); return(handles.CheckHit(viewport.ViewportToRay(x, y))); }