mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 04:57:58 +02:00
Include localVelocity etc. to match Entity.getEntityProperties()
This commit is contained in:
parent
9d3e9f6a78
commit
200ff2499e
2 changed files with 13 additions and 1 deletions
|
@ -299,7 +299,16 @@ AvatarEntityMap ScriptableAvatar::getAvatarEntityDataInternal(bool allProperties
|
||||||
for (const auto& itr : _entities) {
|
for (const auto& itr : _entities) {
|
||||||
QUuid id = itr.first;
|
QUuid id = itr.first;
|
||||||
EntityItemPointer entity = itr.second;
|
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;
|
QByteArray blob;
|
||||||
EntityItemProperties::propertiesToBlob(_scriptEngine, sessionID, properties, blob, allProperties);
|
EntityItemProperties::propertiesToBlob(_scriptEngine, sessionID, properties, blob, allProperties);
|
||||||
data[id] = blob;
|
data[id] = blob;
|
||||||
|
|
|
@ -2562,6 +2562,9 @@ QVariantList MyAvatar::getAvatarEntitiesVariant() {
|
||||||
auto desiredProperties = entity->getEntityProperties(params);
|
auto desiredProperties = entity->getEntityProperties(params);
|
||||||
desiredProperties += PROP_LOCAL_POSITION;
|
desiredProperties += PROP_LOCAL_POSITION;
|
||||||
desiredProperties += PROP_LOCAL_ROTATION;
|
desiredProperties += PROP_LOCAL_ROTATION;
|
||||||
|
desiredProperties += PROP_LOCAL_VELOCITY;
|
||||||
|
desiredProperties += PROP_LOCAL_ANGULAR_VELOCITY;
|
||||||
|
desiredProperties += PROP_LOCAL_DIMENSIONS;
|
||||||
QVariantMap avatarEntityData;
|
QVariantMap avatarEntityData;
|
||||||
avatarEntityData["id"] = entityID;
|
avatarEntityData["id"] = entityID;
|
||||||
EntityItemProperties entityProperties = entity->getProperties(desiredProperties);
|
EntityItemProperties entityProperties = entity->getProperties(desiredProperties);
|
||||||
|
|
Loading…
Reference in a new issue