Merge pull request #13469 from hyperlogic/safeLandingFix4

Fix for landing on the roof of some domains.
This commit is contained in:
John Conklin II 2018-06-27 10:23:35 -07:00 committed by GitHub
commit e7d5ea561b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -279,18 +279,16 @@ EntityItemProperties RenderableModelEntityItem::getProperties(EntityPropertyFlag
}
bool RenderableModelEntityItem::supportsDetailedRayIntersection() const {
return isModelLoaded();
return true;
}
bool RenderableModelEntityItem::findDetailedRayIntersection(const glm::vec3& origin, const glm::vec3& direction,
OctreeElementPointer& element, float& distance, BoxFace& face,
glm::vec3& surfaceNormal, QVariantMap& extraInfo, bool precisionPicking) const {
auto model = getModel();
if (!model) {
return true;
if (!model || !isModelLoaded()) {
return false;
}
// qCDebug(entitiesrenderer) << "RenderableModelEntityItem::findDetailedRayIntersection() precisionPicking:"
// << precisionPicking;
return model->findRayIntersectionAgainstSubMeshes(origin, direction, distance,
face, surfaceNormal, extraInfo, precisionPicking, false);