Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void initCamera() {
- float frustumSize = 180;
- camera.setLocation(new Vector3f(0, 0, 0));
- camera.setParallelProjection(true);
- float aspect = (float) camera.getWidth() / (float) camera.getHeight();
- camera.setFrustum(-1000, 1000, -aspect * frustumSize, aspect * frustumSize, frustumSize, -frustumSize);
- float f = 35.264f * FastMath.DEG_TO_RAD;
- float f2 = FastMath.QUARTER_PI;
- Quaternion rot = new Quaternion(new float[] { f, f2, 0});
- camera.setRotation(rot);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement