mirror of
https://github.com/overte-org/overte.git
synced 2025-07-22 14:53:58 +02:00
use axis aligned bounding box for highlight and selection box instead of non-axis aligned box
This commit is contained in:
parent
82a9429414
commit
cdafba603d
1 changed files with 4 additions and 10 deletions
|
@ -393,14 +393,8 @@ SelectionDisplay = (function () {
|
|||
|
||||
that.highlightSelectable = function(entityID) {
|
||||
var properties = Entities.getEntityProperties(entityID);
|
||||
var center = { x: properties.position.x, y: properties.position.y, z: properties.position.z };
|
||||
Overlays.editOverlay(highlightBox,
|
||||
{
|
||||
visible: true,
|
||||
position: center,
|
||||
dimensions: properties.dimensions,
|
||||
rotation: properties.rotation,
|
||||
});
|
||||
Overlays.editOverlay(highlightBox, { visible: true, position: properties.boundingBox.center,
|
||||
dimensions: properties.boundingBox.dimensions });
|
||||
};
|
||||
|
||||
that.unhighlightSelectable = function(entityID) {
|
||||
|
@ -642,8 +636,8 @@ SelectionDisplay = (function () {
|
|||
|
||||
Overlays.editOverlay(highlightBox, { visible: false });
|
||||
|
||||
Overlays.editOverlay(selectionBox, { visible: selectionBoxVisible, position: objectCenter, dimensions: properties.dimensions,
|
||||
rotation: properties.rotation,});
|
||||
Overlays.editOverlay(selectionBox, { visible: selectionBoxVisible, position: properties.boundingBox.center,
|
||||
dimensions: properties.boundingBox.dimensions });
|
||||
|
||||
|
||||
Overlays.editOverlay(grabberMoveUp, { visible: translateHandlesVisible, position: { x: boundsCenter.x, y: top + grabberMoveUpOffset, z: boundsCenter.z } });
|
||||
|
|
Loading…
Reference in a new issue