mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-16 22:30:42 +02:00
zero velocities when entities cease to be dynamic
This commit is contained in:
parent
ab133f37a0
commit
73805e831b
1 changed files with 6 additions and 1 deletions
|
@ -1556,6 +1556,11 @@ PropertiesTool = function(opts) {
|
|||
Entities.editEntity(selectionManager.selections[i], properties);
|
||||
}
|
||||
} else {
|
||||
if (data.properties.dynamic === false) {
|
||||
// this object is leaving dynamic, so we zero its velocities
|
||||
data.properties["velocity"] = {x: 0, y: 0, z: 0};
|
||||
data.properties["angularVelocity"] = {x: 0, y: 0, z: 0};
|
||||
}
|
||||
if (data.properties.rotation !== undefined) {
|
||||
var rotation = data.properties.rotation;
|
||||
data.properties.rotation = Quat.fromPitchYawRollDegrees(rotation.x, rotation.y, rotation.z);
|
||||
|
@ -1836,4 +1841,4 @@ propertyMenu.onSelectMenuItem = function(name) {
|
|||
|
||||
var showMenuItem = propertyMenu.addMenuItem("Show in Marketplace");
|
||||
|
||||
propertiesTool = PropertiesTool();
|
||||
propertiesTool = PropertiesTool();
|
||||
|
|
Loading…
Reference in a new issue