mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 13:23:36 +02:00
don't cauterize head-children when they are grabbed
This commit is contained in:
parent
c8e9bff03a
commit
4fbc257be0
4 changed files with 5 additions and 3 deletions
|
@ -773,7 +773,7 @@ void MyAvatar::simulate(float deltaTime, bool inView) {
|
|||
auto headBoneSet = _skeletonModel->getCauterizeBoneSet();
|
||||
forEachChild([&](SpatiallyNestablePointer object) {
|
||||
bool isChildOfHead = headBoneSet.find(object->getParentJointIndex()) != headBoneSet.end();
|
||||
if (isChildOfHead) {
|
||||
if (isChildOfHead && !object->hasGrabs()) {
|
||||
// Cauterize or display children of head per head drawing state.
|
||||
updateChildCauterization(object, !_prevShouldDrawHead);
|
||||
object->forEachDescendant([&](SpatiallyNestablePointer descendant) {
|
||||
|
|
|
@ -1869,8 +1869,6 @@ private:
|
|||
bool _enableDebugDrawIKChains { false };
|
||||
bool _enableDebugDrawDetailedCollision { false };
|
||||
|
||||
mutable bool _cauterizationNeedsUpdate; // do we need to scan children and update their "cauterized" state?
|
||||
|
||||
AudioListenerMode _audioListenerMode;
|
||||
glm::vec3 _customListenPosition;
|
||||
glm::quat _customListenOrientation;
|
||||
|
|
|
@ -385,6 +385,7 @@ void Avatar::updateGrabs() {
|
|||
entityTree->updateEntityQueryAACube(target, packetSender, force, iShouldTellServer);
|
||||
});
|
||||
}
|
||||
_cauterizationNeedsUpdate = true;
|
||||
}
|
||||
_avatarGrabs.remove(grabID);
|
||||
_changedAvatarGrabs.remove(grabID);
|
||||
|
@ -402,6 +403,7 @@ void Avatar::updateGrabs() {
|
|||
target->addGrab(grab);
|
||||
// only clear this entry from the _changedAvatarGrabs if we found the entity.
|
||||
changeItr.remove();
|
||||
_cauterizationNeedsUpdate = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -536,6 +536,8 @@ protected:
|
|||
glm::vec3 _worldUpDirection { Vectors::UP };
|
||||
bool _moving { false }; ///< set when position is changing
|
||||
|
||||
mutable bool _cauterizationNeedsUpdate; // do we need to scan children and update their "cauterized" state?
|
||||
|
||||
// protected methods...
|
||||
bool isLookingAtMe(AvatarSharedPointer avatar) const;
|
||||
void updateGrabs();
|
||||
|
|
Loading…
Reference in a new issue