From 5dc45e895cda958d95525414e5247ecd61561c7d Mon Sep 17 00:00:00 2001 From: HifiExperiments Date: Sat, 2 Jan 2021 19:18:54 -0800 Subject: [PATCH] more fixes and create checkbox defaults to checked --- libraries/entities-renderer/src/RenderableModelEntityItem.cpp | 2 +- libraries/entities/src/EntityItem.cpp | 2 +- scripts/system/create/qml/NewModelDialog.qml | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/libraries/entities-renderer/src/RenderableModelEntityItem.cpp b/libraries/entities-renderer/src/RenderableModelEntityItem.cpp index 1ac34a2170..3f72527d72 100644 --- a/libraries/entities-renderer/src/RenderableModelEntityItem.cpp +++ b/libraries/entities-renderer/src/RenderableModelEntityItem.cpp @@ -167,7 +167,6 @@ void RenderableModelEntityItem::updateModelBounds() { model->setSnapModelToRegistrationPoint(!_useOriginalPivot, registrationPoint); updateRenderItems = true; needsSimulate = true; - locationChanged(); _needsToRescaleModel = false; } @@ -183,6 +182,7 @@ void RenderableModelEntityItem::updateModelBounds() { // NOTE: on isAnimatingSomething() we need to call Model::simulate() which calls Rig::updateRig() // TODO: there is opportunity to further optimize the isAnimatingSomething() case. model->simulate(0.0f); + locationChanged(); _needsInitialSimulation = false; _needsJointSimulation = false; updateRenderItems = true; diff --git a/libraries/entities/src/EntityItem.cpp b/libraries/entities/src/EntityItem.cpp index 3996920572..f7bd0266fa 100644 --- a/libraries/entities/src/EntityItem.cpp +++ b/libraries/entities/src/EntityItem.cpp @@ -1637,7 +1637,7 @@ AACube EntityItem::getMaximumAACube(bool& success) const { // put a cube around the sphere // TODO? replace _maxAACube with _boundingSphereRadius - glm::vec3 minimumCorner = (centerOfRotation + getPivot()) - glm::vec3(radius, radius, radius); + glm::vec3 minimumCorner = (centerOfRotation + getWorldOrientation() * getPivot()) - glm::vec3(radius, radius, radius); _maxAACube = AACube(minimumCorner, radius * 2.0f); } } else { diff --git a/scripts/system/create/qml/NewModelDialog.qml b/scripts/system/create/qml/NewModelDialog.qml index 807ab1cd56..c03e7c1c35 100644 --- a/scripts/system/create/qml/NewModelDialog.qml +++ b/scripts/system/create/qml/NewModelDialog.qml @@ -123,6 +123,7 @@ Rectangle { CheckBox { id: useOriginalPivot text: qsTr("Use Original Pivot") + checked: true } CheckBox {