Closed iksena closed 6 years ago
nevermind, I already solve this issue,. Sorry to bother you, you can close this now. modelInstance = new ModelInstance(model);
modelInstance.calculateBoundingBox(box);
float width = box.getWidth();
float height = box.getHeight();
float depth = box.getDepth();
Log.d("Scale size", String.format("width=%f,height=%f,depth=%f",width,height,depth));
scale[0] = 274.4f/width; //I get these numbers by multiplying the jet width to default scale (8.0)
scale[1] = 52.8f/height; //you can see the default scale in Renderer class, MODEL_SCALE
scale[2] = 195.2f/depth;
Log.d("Scale value", String.format("scaleX=%f,scaleY=%f,scaleZ=%f",scale[0],scale[1],scale[2]));
First of all thank you very much for this repo, it's working great. I tested this app and it loaded the jet model perfectly. But when I tried to load another model (around 1 mb .g3db file) it won't be loaded. I've been debugging it and find out it maybe the size of the model because when I tried to get the boundingbox width, height, and depth with this code:
It returns for this model: Jet: width=34.292183, height=6.583758, depth=24.409595 and my model: House: width=16360.018555, height=7484.190918, depth=23281.628906
is there any way to resize it so that it can be displayed?