loading 3d's

Started by kitox, December 12, 2012, 10:16:23 PM

Previous topic - Next topic

kitox

i cant understand the hello world tutorial... i dont have any idea how to load .obj format........help please....

EgonOlsen

Please stop spamming the forum with help requests...that won't take you anywhere. If you don't understand HelloWorld, you should try to...understand HelloWorld. HelloWorld is as simple as it gets. Before trying to load obj files, you should really try to get familiar with HelloWorld.

kitox


BABABLACK_911

I've achieved the loading of OBJ files.... just replace the code in hello world..

/*cube = Primitives.getDoubleCone(20);
            cube.calcTextureWrapSpherical();
            cube.setTexture("texture");
            cube.strip();
            cube.build();
world.addObject(cube);*/

by this...

cube = Object3D.mergeAll(Loader.loadOBJ(getResources().getAssets().open("airboat.obj"), null, 10));
               cube.build();
               world.addObject(cube);

be sure to surround this snippet by a try catch block.
hope this helps.