我正在使用JPCT-AE而我正试图把我的相机放在一个球体内,但它根本没有显示任何东西。如果我将相机设置在同一指向它的外面,那么我可以看到形状。
Texture texture = new Texture(3000, 3000, RGBColor.RED);
TextureManager.getInstance().addTexture("sphere", texture);
mSphere = Primitives.getSphere(20);
//mSphere.calcTextureWrapSpherical();
mSphere.setTexture("sphere");
mSphere.build();
mWorld = new World();
//mWorld.setAmbientLight(50,50,50);
mWorld.addObject(mSphere);
Camera camera = mWorld.getCamera();
//camera.moveCamera( Camera.CAMERA_MOVEOUT, 30 );
//camera.setPosition( mSphere.getTransformedCenter() );
camera.lookAt( mSphere.getTransformedCenter() );
//camera.moveCamera(Camera.CAMERA_MOVEIN, 5);
MemoryHelper.compact();
我尝试过简单地评论和取消注释代码的各个方面,但我无处可去。
答案 0 :(得分:0)
原来我打开了剔除。
mSphere.setCulling(false);
修正了它:)