When I add a texture in the material editor, the texture maps onto the model correctly. But when I add a texture during runtime, it does not map correctly on the model. What should I do to fix this?
Spatial model = assetManager.loadModel(carData.getString("model"));
Material mat = assetManager.loadMaterial(carData.getString("material"));
Texture tex = assetManager.loadTexture(carData.getString("texture"));
mat.setTexture("DiffuseMap", tex);
model.setMaterial(mat);