mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 12:04:18 +02:00
when a ModelEntityItem moves, also update its meta-render-item
This commit is contained in:
parent
85272a87ba
commit
dd2a29aace
1 changed files with 10 additions and 0 deletions
|
@ -807,6 +807,16 @@ void RenderableModelEntityItem::locationChanged(bool tellPhysics) {
|
|||
if (_model && _model->isActive()) {
|
||||
_model->setRotation(getRotation());
|
||||
_model->setTranslation(getPosition());
|
||||
|
||||
auto myMetaItemCopy = _myMetaItem;
|
||||
|
||||
void* key = (void*)this;
|
||||
AbstractViewStateInterface::instance()->pushPostUpdateLambda(key, [_myMetaItem]() {
|
||||
render::ScenePointer scene = AbstractViewStateInterface::instance()->getMain3DScene();
|
||||
render::PendingChanges pendingChanges;
|
||||
pendingChanges.updateItem<RenderableModelEntityItemMeta>(myMetaItemCopy, [](RenderableModelEntityItemMeta& data){});
|
||||
scene->enqueuePendingChanges(pendingChanges);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue