Closed a-type closed 2 years ago
https://github.com/viridia/demo-rapier-three/blob/main/src/terrain/TerrainShape.ts#L108 check this out and try.
Thanks - it appears my error was because the heightmap height array should be (width + 1) * (height + 1)
in length, not width * height
as I assumed. It's working now!
No matter what I provide to the collider description, 3d heightfields always seem to throw this error:
last line of JS code before the exception is thrown:
My heightfield is 257x257, the Float32Array of heights is correspondingly 66049 entries in size. But I've also tried a 2x2 heightfield full of 0s, same error.
I'm using
@dimforge/rapier3d-compat
Version is 0.8.1.