Skip to content

Commit

Permalink
Can't select or brush on invisible shapes anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
ousnius committed Sep 10, 2016
1 parent e4c379d commit 2f4a699
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/render/GLSurface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,11 @@ bool GLSurface::CollideMeshes(int ScreenX, int ScreenY, Vector3& outOrigin, Vect
if (results.size() > 0) {
collided = true;

if (!m->bVisible) {
collided = false;
continue;
}

int min_i = 0;
float minDist = results[0].HitDistance;
for (int i = 1; i < results.size(); i++)
Expand Down Expand Up @@ -733,6 +738,9 @@ bool GLSurface::UpdateCursor(int ScreenX, int ScreenY, bool allMeshes, string* h
if (m->bvh->IntersectRay(o, d, &results)) {
ret = true;
if (results.size() > 0) {
if (!m->bVisible)
continue;

int min_i = 0;
float minDist = results[0].HitDistance;
for (int i = 1; i < results.size(); i++)
Expand Down

0 comments on commit 2f4a699

Please sign in to comment.