Merge pull request #15163 from danteruiz/fix-laser-scaling

Case 21499: Lasers are offset in front of hands after scaling avatar down then relaunching
This commit is contained in:
Shannon Romano 2019-03-21 13:13:18 -07:00 committed by GitHub
commit 33e73953eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View file

@ -1122,6 +1122,7 @@ public:
float getUserEyeHeight() const;
virtual SpatialParentTree* getParentTree() const override;
virtual glm::vec3 scaleForChildren() const override { return glm::vec3(getSensorToWorldScale()); }
const QUuid& getSelfID() const { return AVATAR_SELF_ID; }

View file

@ -20,8 +20,10 @@ public:
_jointIndex(jointIndex) {
auto nestablePointer = _spatiallyNestable.lock();
if (nestablePointer) {
glm::vec3 nestableDimensions = getActualScale(nestablePointer);
_baseScale = glm::max(glm::vec3(0.001f), nestableDimensions);
if (nestablePointer->getNestableType() != NestableType::Avatar) {
glm::vec3 nestableDimensions = getActualScale(nestablePointer);
_baseScale = glm::max(glm::vec3(0.001f), nestableDimensions);
}
}
}