# Weird space between ground meshes

**URL:** <https://forum.babylonjs.com/t/weird-space-between-ground-meshes/2281>\
**Category:** Questions\
**Created:** [April 1, 2019, 5:32pm UTC](https://forum.babylonjs.com/t/weird-space-between-ground-meshes/2281 "2019-04-01T17:32:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Asif\_Ali](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/asif_ali/32/1470_2.png) [@Asif\_Ali](https://forum.babylonjs.com/u/Asif_Ali)\
**Post date:** [April 1, 2019, 5:32pm UTC](https://forum.babylonjs.com/t/weird-space-between-ground-meshes/2281/1 "2019-04-01T17:32:40Z")

</div>

Weird space between ground meshes when they have large size value for position x,y,z,

- [playground](https://www.babylonjs-playground.com/#95HXZJ#3):
- They should be rendered at precise location without any random spaces when camera move around

---

<div class="post-metadata">

**Author:** ![aWeirdo](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/aweirdo/32/52_2.png) [@aWeirdo](https://forum.babylonjs.com/u/aWeirdo)\
**Post date:** [April 1, 2019, 6:27pm UTC](https://forum.babylonjs.com/t/weird-space-between-ground-meshes/2281/2 "2019-04-01T18:27:51Z")

</div>

Seems like a floating point / precision issue…(?) unsure of the correct naming / description.

Your ground meshes are extremely far away from the world center, starting at {x: 168920, y: 0, z: 128920}  
this is a known issue with openGL / WebGL.

Solution would orbviously be to move meshes closer to the world center 🙂

---

<div class="post-metadata">

**Author:** ![Asif\_Ali](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/asif_ali/32/1470_2.png) [@Asif\_Ali](https://forum.babylonjs.com/u/Asif_Ali)\
**Post date:** [April 1, 2019, 7:08pm UTC](https://forum.babylonjs.com/t/weird-space-between-ground-meshes/2281/3 "2019-04-01T19:08:06Z")

</div>

yes you are right , well i was hoping to use world map tile coordinate system and place real world terrain tile meshes using geo coordinates in 3d world

---

<div class="post-metadata">

**Author:** ![aWeirdo](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/aweirdo/32/52_2.png) [@aWeirdo](https://forum.babylonjs.com/u/aWeirdo)\
**Post date:** [April 1, 2019, 7:45pm UTC](https://forum.babylonjs.com/t/weird-space-between-ground-meshes/2281/4 "2019-04-01T19:45:38Z")

</div>

You could make a “virtual offset”, so render at 0,0 but keep a cache, something like…

var coords = []; // index = X coord  
coords[x] = []; // index = Z coord  
coords[x][z] = Id of tile mesh to display at this offset

var tiles = []; // index = tile mesh id, containing different types of tile meshes

var offsets = {x: 0, z: 0};

then move tiles instead of camera, update offsets object on movement and place/replace tiles from coords array based on offsets… I hope it’s understandable 😄

---

<div class="post-metadata">

**Author:** ![Asif\_Ali](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/asif_ali/32/1470_2.png) [@Asif\_Ali](https://forum.babylonjs.com/u/Asif_Ali)\
**Post date:** [April 2, 2019, 9:49am UTC](https://forum.babylonjs.com/t/weird-space-between-ground-meshes/2281/5 "2019-04-02T09:49:19Z")

</div>

i think its great idea , i will try to implement it , thank you aWeirdo
