mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-06-16 03:00:42 +02:00
Merge pull request #13469 from hyperlogic/safeLandingFix4
Fix for landing on the roof of some domains.
This commit is contained in:
commit
e7d5ea561b
1 changed files with 3 additions and 5 deletions
|
@ -279,18 +279,16 @@ EntityItemProperties RenderableModelEntityItem::getProperties(EntityPropertyFlag
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RenderableModelEntityItem::supportsDetailedRayIntersection() const {
|
bool RenderableModelEntityItem::supportsDetailedRayIntersection() const {
|
||||||
return isModelLoaded();
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RenderableModelEntityItem::findDetailedRayIntersection(const glm::vec3& origin, const glm::vec3& direction,
|
bool RenderableModelEntityItem::findDetailedRayIntersection(const glm::vec3& origin, const glm::vec3& direction,
|
||||||
OctreeElementPointer& element, float& distance, BoxFace& face,
|
OctreeElementPointer& element, float& distance, BoxFace& face,
|
||||||
glm::vec3& surfaceNormal, QVariantMap& extraInfo, bool precisionPicking) const {
|
glm::vec3& surfaceNormal, QVariantMap& extraInfo, bool precisionPicking) const {
|
||||||
auto model = getModel();
|
auto model = getModel();
|
||||||
if (!model) {
|
if (!model || !isModelLoaded()) {
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
// qCDebug(entitiesrenderer) << "RenderableModelEntityItem::findDetailedRayIntersection() precisionPicking:"
|
|
||||||
// << precisionPicking;
|
|
||||||
|
|
||||||
return model->findRayIntersectionAgainstSubMeshes(origin, direction, distance,
|
return model->findRayIntersectionAgainstSubMeshes(origin, direction, distance,
|
||||||
face, surfaceNormal, extraInfo, precisionPicking, false);
|
face, surfaceNormal, extraInfo, precisionPicking, false);
|
||||||
|
|
Loading…
Reference in a new issue