particle effect entities no longer intersect with rays

This commit is contained in:
ericrius1 2015-11-04 16:05:29 -08:00
parent af0c0e6a1b
commit 4e5b806934
2 changed files with 5 additions and 1 deletions

View file

@ -18,6 +18,7 @@
#include "EntityItemProperties.h"
#include "EntityTree.h"
#include "EntityTreeElement.h"
#include "EntityTypes.h"
EntityTreeElement::EntityTreeElement(unsigned char* octalCode) : OctreeElement() {
init(octalCode);
@ -591,7 +592,8 @@ bool EntityTreeElement::findDetailedRayIntersection(const glm::vec3& origin, con
}
} else {
// if the entity type doesn't support a detailed intersection, then just return the non-AABox results
if (localDistance < distance) {
// Never intersect with particle effect entities
if (localDistance < distance && EntityTypes::getEntityTypeName(entity->getType()) != "ParticleEffect") {
distance = localDistance;
face = localFace;
surfaceNormal = localSurfaceNormal;

View file

@ -215,6 +215,8 @@ public:
_additiveBlending = additiveBlending;
}
virtual bool supportsDetailedRayIntersection() const { return false; }
protected:
bool isAnimatingSomething() const;