Merge pull request #9105 from druiz17/teleportBug

Fix for unable to teleport to areas that you should
This commit is contained in:
Chris Collins 2016-12-01 11:35:06 -08:00 committed by GitHub
commit 942850293e

View file

@ -623,7 +623,7 @@ bool EntityTreeElement::findDetailedRayIntersection(const glm::vec3& origin, con
// and testing intersection there.
if (entityFrameBox.findRayIntersection(entityFrameOrigin, entityFrameDirection, localDistance,
localFace, localSurfaceNormal)) {
if (localDistance < distance) {
if (entityFrameBox.contains(entityFrameOrigin) || localDistance < distance) {
// now ask the entity if we actually intersect
if (entity->supportsDetailedRayIntersection()) {
if (entity->findDetailedRayIntersection(origin, direction, keepSearching, element, localDistance,