|
|
@ -1496,12 +1496,7 @@ public class TerrainQuad extends Node implements Terrain { |
|
|
|
for (int i = 0; i < getQuantity(); i++) { |
|
|
|
for (int i = 0; i < getQuantity(); i++) { |
|
|
|
if (children.get(i) instanceof TerrainPatch) { |
|
|
|
if (children.get(i) instanceof TerrainPatch) { |
|
|
|
TerrainPatch tp = (TerrainPatch) children.get(i); |
|
|
|
TerrainPatch tp = (TerrainPatch) children.get(i); |
|
|
|
if (tp.getModelBound() instanceof BoundingBox) { |
|
|
|
tp.ensurePositiveVolumeBBox(); |
|
|
|
if (((BoundingBox)tp.getModelBound()).getYExtent() == 0) { |
|
|
|
|
|
|
|
// a correction so the box always has a volume
|
|
|
|
|
|
|
|
((BoundingBox)tp.getModelBound()).setYExtent(0.00001f); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (tp.getWorldBound().intersects(toTest)) { |
|
|
|
if (tp.getWorldBound().intersects(toTest)) { |
|
|
|
CollisionResults cr = new CollisionResults(); |
|
|
|
CollisionResults cr = new CollisionResults(); |
|
|
|
toTest.collideWith(tp.getWorldBound(), cr); |
|
|
|
toTest.collideWith(tp.getWorldBound(), cr); |
|
|
|