Hey, I’m new to jmonkeyengine and I’ve been reading through the tutorials and forums like crazy but I have two issues with terrains that I can’t resolve.
-
Collision with flat heightmap isn’t working. I’m using a terraingrid, but this also happens when i just use one terrainquad based on a completely flat heightmap, all other terrain collision is working fine for me. If i change the heightmap so that one pixel is different suddenly the terrain becomes solid, it’s bizarre to me. The flat terrainquads that are generated when no heightmap is found are solid. I tried changing the stepheight, but that doesn’t fix anything. I could post code but I’m not sure what exactly is the most relevant and I’m just using really basic collision code from the demos. Any ideas? I just want to solve this to make sure I’m doing the collision correctly.
-
Terraingrid quad size. When using size 257 heightmaps and not changing the localscaling, the terraingrids place a new terrain right in front of you. I’ve heard that you need to make sure the size of your terrainquads is like 2x the size of your view distance? is that correct? if so, with like a 257 size heightmap it seems like i need to scale it like over 10x or something crazy like that, if using like a 5k farplane for your view frustum (the 1k far plane view frustum seems unnaturally close to me). Is scaling it that much what I should be doing? That seems to be a really large area for such few vertices to me. I don’t really understand why terraingrids are only 4 terraingrids, I feel like it should be 3x3, so that you are always in the center. By the time the terraingrid determines that it needs to recenter you, you’re extremely close to the edge. Any thoughts?