Search the Community
Showing results for tags 'Groundmesh'.
Found 2 results
Hi there, I just started learning BabylonJS some days ago (and I love it so far), but I'm having an issue. I am loading scenes, with a plane called WaterPlane, which is... The water plane. I am using some shaders to simulate water surface on it, however, as it only has 4 vertices, the vertex shader is not really useful... So I decided to convert it to a GroundMesh (which has more vertices), the only issue I am getting is regarding the size of the WaterPlane, I can't use the scaling data as it makes a huge water surface... I've spent some time looking on the internet, how I could get the scale of a plane after importing it from a scene, but I can't find a way to do it... I can't set the Ground mesh manually as the water plane will change size over different scenes, and I can't modify the plane to add more vertices before importing... Thanls in advance for your help guys !
Hi Guys, I am building a system where I load tiles of a terrain by demand. Depending of where the camera is, I create new GroudMeshes as needed and tile it on the terrain. My Tiles are a json object with altitude data and some other values. I am facing a problem after loading the grounds. I cannot see any error and the grounds are loaded but they are "not visible" and depending of the angle of the camera they appear in the scene and disappear. They should also be checking collisions but they are not. I have a running example of my system, for simplicity I am always loading the same json but the control of the tiles and the rest are the same. https://dl.dropboxusercontent.com/u/63244599/CollisionsAndVisibility/CollisionsAndVisibility.html To see the problem just click on the link after loading try to move the camera arround (keep the same position) looking in a 20 degree down aprox. and You will see the ground, if you are lucky :S According with my testing, it seems to be something related with loading the meshes during the "before render" or "render" events. If I load all of them before start running the scene. It looks ok. I can also provide you with a zip file that includes the folder and all the files. Any ideas?