problem to create object3d model

Started by ashunkhs, May 09, 2013, 02:10:57 PM

Previous topic - Next topic

ashunkhs

hi

i have to create  Object3D model  with object ID 0.
but when i start app  line1 print object ID->0 but again reopen the app it print ID-->1....and increase one by one .
so, how to set the object ID ,which always print 0.

Object3D cube_lm= null
cube_up_rt = Primitives.getPlane(9, 9);
         System.out.println("cube_up_rt id-------->"+cube_up_rt.getID());......................line 1
         cube_up_rt.setTexture("eng_text");
         cube_up_rt.rotateY(-60);
         //cube_up_rt.strip();
         cube_up_rt.build();
         cube_up_rt.setCollisionMode(Object3D.COLLISION_CHECK_OTHERS);
         cube_up_rt.translate(380, 160, 0);

when i do in
onDestry()
{
world.removeObject(cube_up_rt);
cube_up_rt=null;
tm.removeTexture("hebrew_text");
world.dispose();
world = null;
fb.freeMemory();
fb.dispose();
fb = null;
}               and i got the same result.pls help me out.

ashunkhs

#1

i got it .
cube.setName("1"); and
TextureNumber(Integer.parseInt(obj.getName()));

now i am getting always right ID.


thanks......