我正在使用 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();
我试过简单地注释和取消注释代码的各个区域,但我一无所获。