Example of heightfield map? #272
-
Can you give an example of a heightfield map? I'm starting with a simple 64 x 64 black and white heightmap *.png file and my cube appears to be hitting something, but it's not lining up to the texture my heightmap is mapped to? I'm using
I suppose my question would be, what values are supposed to be stored in the heightmapArraySize array, is it the actual heightmap int greyscale values from 0 - 256 or is it float type numbers? Here is the heightfield example:
I'm not quite sure if I'm even doing this correctly, thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Ugh... I always do this but I think I answered my own question. The array is wrong, should be:
As per HeightField.cpp @ line 171. But most importantly, the terrain y position was always off by some factor. In the |
Beta Was this translation helpful? Give feedback.
Ugh... I always do this but I think I answered my own question. The array is wrong, should be: