commit e6bb503bf9a2947e2f0c934b004dfd3a7d44d7fe
parent 81a52fbdaabd1fc1e321d6dce6cbf55677f46e1f
Author: William Casarin <jb55@jb55.com>
Date: Mon, 29 Jul 2019 08:01:02 -0700
smaller pdist fixes collisions
Now that we only use the grid vert lookup for finding touched triangles,
having a smaller grid fixes wonkiness. I guess this makes sense but I can't
articulate why in any more detail.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/terrain.c b/src/terrain.c
@@ -207,7 +207,7 @@ void create_terrain(struct terrain *terrain, float scale, int seed) {
del_point2d_t *points = calloc(terrain->n_samples, sizeof(*points));
float *verts = calloc(terrain->n_samples * 3, sizeof(*verts));
- terrain->cell_size = pdist * 1.5;
+ terrain->cell_size = pdist;
terrain->n_cells = round(size / terrain->cell_size);
debug("n_cells %d\n", terrain->n_cells);