fix particle intersection

This commit is contained in:
HifiExperiments 2024-03-22 21:38:38 -07:00
parent f7c17d6035
commit 9f3cf5a029

View file

@ -258,7 +258,7 @@ EntityItemID EntityTreeElement::evalDetailedRayIntersection(const glm::vec3& ori
} else {
// if the entity type doesn't support a detailed intersection, then just return the non-AABox results
// Never intersect with particle entities
if (localDistance < distance && (entity->getType() != EntityTypes::ParticleEffect || entity->getType() != EntityTypes::ProceduralParticleEffect)) {
if (localDistance < distance && (entity->getType() != EntityTypes::ParticleEffect && entity->getType() != EntityTypes::ProceduralParticleEffect)) {
distance = localDistance;
face = localFace;
surfaceNormal = glm::vec3(rotation * glm::vec4(localSurfaceNormal, 0.0f));
@ -410,7 +410,7 @@ EntityItemID EntityTreeElement::evalDetailedParabolaIntersection(const glm::vec3
} else {
// if the entity type doesn't support a detailed intersection, then just return the non-AABox results
// Never intersect with particle entities
if (localDistance < parabolicDistance && (entity->getType() != EntityTypes::ParticleEffect || entity->getType() != EntityTypes::ProceduralParticleEffect)) {
if (localDistance < parabolicDistance && (entity->getType() != EntityTypes::ParticleEffect && entity->getType() != EntityTypes::ProceduralParticleEffect)) {
parabolicDistance = localDistance;
face = localFace;
surfaceNormal = glm::vec3(rotation * glm::vec4(localSurfaceNormal, 0.0f));