Hi, again me, I have another problem, your “getChild()” doesn’t exist
So I write this:
map = assetManager.loadModel(“Scenes/water_surface.j3o”);
vertices = ((Geometry) this.map.getUserData(“Plane/Plane1”)).getMesh().getBuffer(VertexBuffer.Type.Position);
Ok, I added “Plane1” but it told me, that there is nothing “java.lang.NullPointerException”
…well…i mentioned before that you have to properly set values for number of tiles and corresponding vertices you have in square sized water surface…there is no issues with math, you just need to pass proper data values … your array is out of range…
…whole idea is set around water surface plane, created in some 3D modeling tool of choice…such surface could be created in runtime, but this example assume that surface is already created/loaded…other important thing to understand is value of waveMap, which in given example assumes that Y position of plane aligned on to X-Z plane is 0.0f …in case your water surface is aligned somewhere else, then you need to apply that offset on to resulting n value, otherwise it will not look correct…take a look at given image…this should explain everything…
Ok, I have probably last problem, shouldn’t be in “vertices” some values? Because by debuger there are more likely none
Can I as where is the problem? Because when he was getChild(), he didn’t have any problem.