Hello. I use the TerrainQuad, but I rotate the terrain so that it’s in the x-y plane (because for me it’s easier to have z axis for zoom). I changed the TerrainTestCollision.java following way:
terrain.rotate(DEG_TO_RAD * 90, 0, 0); // cam.setLocation(new Vector3f(43f, 121f, 10f)); // cam.setRotation(new Quaternion(0.15824f, -0.79309f, 0.23223f, 0.5404f)); var position = new Vector3f(0, 0, 70); cam.setLocation(position);
Now the camera is at 0,0,70 and looking down on the terrain. The terrain.collideWith(ray, results) is returning 0 results. Before it was working fine. For testing: https://gist.github.com/devent/7ee0cd7c7fa88f058fddc9ba3fbda94d
In the debugger I can see that it finds the TerrainPatch. But then it fails to find the Triangle.
I see there is BresenhamYUpGridTracer. Do I need to create a BresenhamZUpGridTracer with basically stepXDirection and stepYDirection?