Include localVelocity etc. to match Entity.getEntityProperties()

This commit is contained in:
David Rowe 2019-12-01 21:24:40 +13:00
parent 9d3e9f6a78
commit 200ff2499e
2 changed files with 13 additions and 1 deletions

View file

@ -299,7 +299,16 @@ AvatarEntityMap ScriptableAvatar::getAvatarEntityDataInternal(bool allProperties
for (const auto& itr : _entities) {
QUuid id = itr.first;
EntityItemPointer entity = itr.second;
EntityItemProperties properties = entity->getProperties();
EncodeBitstreamParams params;
auto desiredProperties = entity->getEntityProperties(params);
desiredProperties += PROP_LOCAL_POSITION;
desiredProperties += PROP_LOCAL_ROTATION;
desiredProperties += PROP_LOCAL_VELOCITY;
desiredProperties += PROP_LOCAL_ANGULAR_VELOCITY;
desiredProperties += PROP_LOCAL_DIMENSIONS;
EntityItemProperties properties = entity->getProperties(desiredProperties);
QByteArray blob;
EntityItemProperties::propertiesToBlob(_scriptEngine, sessionID, properties, blob, allProperties);
data[id] = blob;

View file

@ -2562,6 +2562,9 @@ QVariantList MyAvatar::getAvatarEntitiesVariant() {
auto desiredProperties = entity->getEntityProperties(params);
desiredProperties += PROP_LOCAL_POSITION;
desiredProperties += PROP_LOCAL_ROTATION;
desiredProperties += PROP_LOCAL_VELOCITY;
desiredProperties += PROP_LOCAL_ANGULAR_VELOCITY;
desiredProperties += PROP_LOCAL_DIMENSIONS;
QVariantMap avatarEntityData;
avatarEntityData["id"] = entityID;
EntityItemProperties entityProperties = entity->getProperties(desiredProperties);