What I am trying to do with this code is
place the camera from the +0.2 from cube's y axis.
Same I had tried with camera.getYAxis() and camera.getPosition().y it is also giving me the same result or only once the camera moves.
I have tried following values 1, 0.1, 0.01, 0.001 but for each one the cube goes out of the screen.
Code Select
((float) (cube.getYAxis().y + 0.2)
place the camera from the +0.2 from cube's y axis.
Same I had tried with camera.getYAxis() and camera.getPosition().y it is also giving me the same result or only once the camera moves.

I have tried following values 1, 0.1, 0.01, 0.001 but for each one the cube goes out of the screen.