Merge pull request #10 from sethalves/laser-bug

allow overlay children to follow avatar from one domain to another
This commit is contained in:
Dante Ruiz 2018-02-08 17:20:18 -08:00 committed by GitHub
commit 2ae976d256
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 2 deletions

View file

@ -181,6 +181,8 @@ void Base3DOverlay::setProperties(const QVariantMap& originalProperties) {
if (properties["parentID"].isValid()) { if (properties["parentID"].isValid()) {
setParentID(QUuid(properties["parentID"].toString())); setParentID(QUuid(properties["parentID"].toString()));
bool success;
getParentPointer(success); // call this to hook-up the parent's back-pointers to its child overlays
needRenderItemUpdate = true; needRenderItemUpdate = true;
} }
if (properties["parentJointIndex"].isValid()) { if (properties["parentJointIndex"].isValid()) {

View file

@ -63,7 +63,7 @@ glm::vec3 Line3DOverlay::getEnd() const {
localEnd = getLocalEnd(); localEnd = getLocalEnd();
worldEnd = localToWorld(localEnd, getParentID(), getParentJointIndex(), getScalesWithParent(), success); worldEnd = localToWorld(localEnd, getParentID(), getParentJointIndex(), getScalesWithParent(), success);
if (!success) { if (!success) {
qDebug() << "Line3DOverlay::getEnd failed"; qDebug() << "Line3DOverlay::getEnd failed, parentID = " << getParentID();
} }
return worldEnd; return worldEnd;
} }

View file

@ -707,7 +707,11 @@ public slots:
void setJointMappingsFromNetworkReply(); void setJointMappingsFromNetworkReply();
void setSessionUUID(const QUuid& sessionUUID) { void setSessionUUID(const QUuid& sessionUUID) {
if (sessionUUID != getID()) { if (sessionUUID != getID()) {
setID(sessionUUID); if (sessionUUID == QUuid()) {
setID(AVATAR_SELF_ID);
} else {
setID(sessionUUID);
}
emit sessionUUIDChanged(); emit sessionUUIDChanged();
} }
} }