www.jpct.net
jPCT-AE - a 3d engine for Android => Support => Topic started by: leorus on August 29, 2013, 01:49:16 pm
-
I have just started using jpct-ae with eclipse.
I do not know how to create a 3d box with required width, height and width. I tried using object=Primitives.getBox(float scale, float scale height). But I am not able to get the required box( length-10, height-2 and depth-50) . can any none please guide me how to do this.
leo
-
Hi leo!
What exactly you are getting ?Are the box with wrong dimensions or they are not appearing on the screen at all? Did you build and add your object3d primitive. Example-
cube = Primitives.getCube(10);
cube.build();
world.addObject(cube);
Also check your camera so that it sees the box in case if it is not visible.
cam.lookAt(cube.getTransformedCenter());
Also check that your camera is far enough .....
i.e it should be not inside the box .
-
The wiki has example code to create a cube. It shouldn't be too hard to modify it in a way that it creates arbitrary boxes.