Hello! I am trying to create a map using an array, like so:
let map = [
[1, 1, 1, 1, 1, 1, 1, 1],
[1, 0, 0, 0, 0, 0, 0, 1],
[1, 0, 0, 0, 0, 0, 0, 1],
[1, 0, 0, 1, 1, 0, 0, 1],
[1, 0, 0, 1, 1, 0, 0, 1],
[1, 0, 0, 0, 0, 0, 0, 1],
[1, 0, 0, 0, 0, 0, 0, 1],
[1, 1, 1, 1, 1, 1, 1, 1]
];
I’m able to create the objects successfully, but the objects go flying off, and only some remain on the ground.
- Is there any way to fix this?
- Is there a more efficient way to create a map?
Thanks in advance!
Link: Babylon.js Playground