到目前为止,我意识到视口是相机内部的一个矩形,代表我想要看到的相机的一部分(如果我错了,请纠正我)。但我无法解释这一点:
我有这台相机:
camera = new OrthographicCamera(10,10);
camera.translate(w/2, h/2);
camera.update();如果相机的尺寸是10x10,为什么我可以设置更大的视口?例如:
camera.viewportHeight=Gdx.graphics.getHeight();
camera.viewportWidth=Gdx.graphics.getWidth();
camera.update();谢谢您抽时间见我
发布于 2014-08-09 19:14:03
否,视口不是摄影机的一部分:
视口是投影3D场景的屏幕的矩形查看区域。它只不过是将3维对象映射到2维平面。
查看这篇非常好的文章:
https://stackoverflow.com/questions/25217835
复制相似问题