I have created one RectangularPrism
with default camera in Rajawali 1.1.777:
RectangularPrism p = new RectangularPrism(2f, 2f, xf);
Depending on x (depth) the perceived width on the Android screen varies.
So from a Rajawali/OpenGL perspective how and why does the depth parameter affect the perceived width of the object on the screen? Since the width (2f) is kept static shouldn't the prism always fill the screen in the same way?
0.1f:
1f:
2f:
Answer from https://github.com/Rajawali/Rajawali/issues/1883
The default camera is a Perspective Camera, faces in the distance appear smaller than faces close by. The default camera is located at 0,0,4 and looks at 0,0,0. If one places a RectangularPrism of size 2,2,0.5 at 0,0,0, the distance between the camera and the closest face is 3.75. If one places a RectangularPrism of size 2,2,2 at 0,0,0, the distance between the camera and the closest face is only 3, and so the closest face appears bigger.
If perspective is not desired, one may instantiate an Orthographic Camera and getCurrentScene().addAndSwitchCamera(orthographicCamera).