diff --git a/examples/editModels.js b/examples/editModels.js index 740c992888..356b228380 100644 --- a/examples/editModels.js +++ b/examples/editModels.js @@ -2449,6 +2449,7 @@ function Tooltip() { text += "Lifetime: " + properties.lifetime + "\n" } text += "Age: " + properties.ageAsText + "\n" + text += "Mass: " + properties.mass + "\n" text += "Script: " + properties.script + "\n" @@ -2906,6 +2907,8 @@ function handeMenuEvent(menuItem) { index++; array.push({ label: "Linear Damping:", value: properties.damping.toFixed(decimals) }); index++; + array.push({ label: "Mass:", value: properties.mass.toFixed(decimals) }); + index++; array.push({ label: "Angular Pitch:", value: properties.angularVelocity.x.toFixed(decimals) }); index++; array.push({ label: "Angular Yaw:", value: properties.angularVelocity.y.toFixed(decimals) }); @@ -3052,6 +3055,7 @@ Window.nonBlockingFormClosed.connect(function() { properties.velocity.y = array[index++].value; properties.velocity.z = array[index++].value; properties.damping = array[index++].value; + properties.mass = array[index++].value; properties.angularVelocity.x = array[index++].value; properties.angularVelocity.y = array[index++].value; diff --git a/libraries/entities/src/EntityItemProperties.cpp b/libraries/entities/src/EntityItemProperties.cpp index 7cc5ebb545..207ed376d8 100644 --- a/libraries/entities/src/EntityItemProperties.cpp +++ b/libraries/entities/src/EntityItemProperties.cpp @@ -134,6 +134,7 @@ QScriptValue EntityItemProperties::copyToScriptValue(QScriptEngine* engine) cons COPY_PROPERTY_TO_QSCRIPTVALUE_VEC3(velocity); COPY_PROPERTY_TO_QSCRIPTVALUE_VEC3(gravity); COPY_PROPERTY_TO_QSCRIPTVALUE(damping); + COPY_PROPERTY_TO_QSCRIPTVALUE(mass); COPY_PROPERTY_TO_QSCRIPTVALUE(lifetime); COPY_PROPERTY_TO_QSCRIPTVALUE_GETTER(age, getAge()); // gettable, but not settable COPY_PROPERTY_TO_QSCRIPTVALUE_GETTER(ageAsText, formatSecondsElapsed(getAge())); // gettable, but not settable