I use the pure BasicGame template and added a sykbox:
[java]
Texture north = assetManager.loadTexture(“Textures/blue_512.jpg”);
Texture south = assetManager.loadTexture(“Textures/yellow_512.jpg”);
Texture up = assetManager.loadTexture(“Textures/green_512.jpg”);
Texture down = assetManager.loadTexture(“Textures/cyan_512.jpg”);
Texture west = assetManager.loadTexture(“Textures/red_512.jpg”);
Texture east = assetManager.loadTexture(“Textures/magenta_512.jpg”);
Spatial sky = SkyFactory.createSky(assetManager, west, east, north, south, up, down);
rootNode.attachChild(sky);
[/java]
The result is:
It is far away from what I expected. My problems / questions:
1.) Why does the skybox and the blue square mesh are so deformed when I move the camera
2.) How do I prevent zooming out of the skybox (the black background on the image)
ok so you zoom with the mouse wheel.
The flyCam zoom is not a zoom as you would expect because it changes the fov of the camera, and at some extend it flips the view and can give weird results.
you should use the “S” key to get the camera away from the scene.
and instead of setting the zoomSpeed se the moveSpeed.
@Tareq said:
Nehon said the FlyCam Zoom changes the fov of the camera. I guess implementing an instance of it does not work.
He also said move the camera instead of change the fov… so… take fly cam and make it move the camera instead of change the fov.
I’m actually not entirely sure what you want, though. Do you still want the camera to move around freely and then also have zoom? You may need to implement your own camera control from scratch, in that case.