Since it's used quite often, let's create a material with a seamless tiled texture, and use it as the floor under the hover tank:
Go back to
HoverTank.java
.Copy the provided
assets/Textures/BrickWall/
directory to yourassets/Textures
directory.Add the following code to the
simpleInitApp()
method:Box floorMesh = new Box(new Vector3f(-20,-2,-20),new Vector3f(20,-3,20)); floorMesh.scaleTextureCoordinates(new Vector2f(8,8)); Geometry floorGeo = new Geometry("floor", floorMesh); Material floorMat = new Material(assetManager, "Common/MatDefs/Light/Lighting.j3md"); floorMat.setTexture("DiffuseMap", assetManager.loadTexture( "Textures/BrickWall/BrickWall_diffuse.jpg")); floorMat.setTexture("NormalMap", assetManager.loadTexture( "Textures/BrickWall/BrickWall_normal.jpg")); floorMat.getTextureParam("NormalMap").getTextureValue(). setWrap(WrapMode.Repeat); floorMat.getTextureParam("DiffuseMap").getTextureValue(). setWrap(WrapMode.Repeat...