Set ground to position x: 0 and z: 0, break the height

Hello, how can i move the ground anchor at position x: 0, z: 0

Here is the playground about my probleme :

https://www.babylonjs-playground.com/#1RKZXB#114

As you can see the position 0, 0 is the middle of the ground mesh, i would like to make it as size/2, size/2 to be sync with my grid system, but when i try with

ground.position.x = map.size/2;
ground.position.z = map.size/2;
ground.updateCoordinateHeights();

it break the getHeightAtCoordinates and the box got a different y as they should.

Thanks for help

Hi @pierre50 and welcome to the forum. Seems like there have been plenty of questions and yours got pushed down the list. Sorry for any delay.

A couple of changes and hope this works for you https://www.babylonjs-playground.com/#1RKZXB#115

1 Like

Thanks John