Long click to move; Boosty page on click before redirect

This commit is contained in:
utkabobr
2025-04-04 19:18:57 +03:00
parent 264e742d3a
commit 5f13961d05
13 changed files with 215 additions and 25 deletions
@@ -374,9 +374,8 @@ public class GLRenderer implements GLSurfaceView.Renderer {
return true;
}
public boolean onClick(float x, float y) {
if (model == null || isViewerEnabled) return false;
public int raycastObjectIndex(float x, float y) {
if (model == null) return -1;
double minDistance = Double.MAX_VALUE;
int j = -1;
for (int i = 0, c = model.getObjectsCount(); i < c; i++) {
@@ -394,6 +393,13 @@ public class GLRenderer implements GLSurfaceView.Renderer {
}
}
}
return j;
}
public boolean onClick(float x, float y) {
if (model == null || isViewerEnabled) return false;
int j = raycastObjectIndex(x, y);
if (isInFlattenMode && (j == selectedObject || j == -1)) {
int minPlane = -1;