jPCT-AE - a 3d engine for Android > Support

loading 3d's

(1/1)

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:
ok...sorry..

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.

Navigation

[0] Message Index

Go to full version