mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 19:01:09 +02:00
Merge pull request #12985 from druiz17/attachments-disappearing
fixing avatr attachments not being visible when coming out of first person
This commit is contained in:
commit
b68d9ecd68
1 changed files with 7 additions and 5 deletions
|
@ -2050,12 +2050,14 @@ void MyAvatar::preDisplaySide(RenderArgs* renderArgs) {
|
||||||
_attachmentData[i].jointName.compare("RightEye", Qt::CaseInsensitive) == 0 ||
|
_attachmentData[i].jointName.compare("RightEye", Qt::CaseInsensitive) == 0 ||
|
||||||
_attachmentData[i].jointName.compare("HeadTop_End", Qt::CaseInsensitive) == 0 ||
|
_attachmentData[i].jointName.compare("HeadTop_End", Qt::CaseInsensitive) == 0 ||
|
||||||
_attachmentData[i].jointName.compare("Face", Qt::CaseInsensitive) == 0) {
|
_attachmentData[i].jointName.compare("Face", Qt::CaseInsensitive) == 0) {
|
||||||
|
uint8_t modelRenderTagBits = shouldDrawHead ? render::ItemKey::TAG_BITS_0 : render::ItemKey::TAG_BITS_NONE;
|
||||||
|
modelRenderTagBits |= render::ItemKey::TAG_BITS_1;
|
||||||
|
_attachmentModels[i]->setVisibleInScene(true, qApp->getMain3DScene(),
|
||||||
|
modelRenderTagBits, false);
|
||||||
|
|
||||||
_attachmentModels[i]->setVisibleInScene(shouldDrawHead, qApp->getMain3DScene(),
|
uint8_t castShadowRenderTagBits = render::ItemKey::TAG_BITS_0 | render::ItemKey::TAG_BITS_1;
|
||||||
render::ItemKey::TAG_BITS_NONE, true);
|
_attachmentModels[i]->setCanCastShadow(true, qApp->getMain3DScene(),
|
||||||
|
castShadowRenderTagBits, false);
|
||||||
_attachmentModels[i]->setCanCastShadow(shouldDrawHead, qApp->getMain3DScene(),
|
|
||||||
render::ItemKey::TAG_BITS_NONE, true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue