diff --git a/scripts/system/edit.js b/scripts/system/edit.js index 5f0317da7c..baf70033f9 100644 --- a/scripts/system/edit.js +++ b/scripts/system/edit.js @@ -714,7 +714,6 @@ function mousePressEvent(event) { } } -var highlightedEntityID = null; var mouseCapturedByTool = false; var lastMousePosition = null; var idleMouseTimerId = null; @@ -780,33 +779,6 @@ function handleIdleMouse() { idleMouseTimerId = null; } -function highlightEntityUnderCursor(position, accurateRay) { - var pickRay = Camera.computePickRay(position.x, position.y); - var entityIntersection = Entities.findRayIntersection(pickRay, accurateRay); - if (entityIntersection.accurate) { - if (highlightedEntityID && highlightedEntityID != entityIntersection.entityID) { - selectionDisplay.unhighlightSelectable(highlightedEntityID); - highlightedEntityID = { - id: -1 - }; - } - - var halfDiagonal = Vec3.length(entityIntersection.properties.dimensions) / 2.0; - - var angularSize = 2 * Math.atan(halfDiagonal / Vec3.distance(Camera.getPosition(), - entityIntersection.properties.position)) * 180 / 3.14; - - var sizeOK = (allowLargeModels || angularSize < MAX_ANGULAR_SIZE) && (allowSmallModels || angularSize > MIN_ANGULAR_SIZE); - - if (entityIntersection.entityID && sizeOK) { - highlightedEntityID = entityIntersection.entityID; - selectionDisplay.highlightSelectable(entityIntersection.entityID); - } - - } -} - - function mouseReleaseEvent(event) { mouseDown = false;