0
\$\begingroup\$

I am trying to setup a viewport using perspective camera. I am trying to render a scene like this scrolls screenshot I read an official blog post about the cameras and found a few tests within gdx test suits. However, I am still kinda confused. I have no idea how to manipulate the test suits nor i have any idea what the code does other than just following the code given in the test.

I have a couple of sub-questions,

  • was the game in the screenshot rendered with perspective camera or just the grids?
  • Is it possible to work with Orthographic and Perspective Camera at the same time? so that i can render different elements with different camera?
  • Is there any detailed and easy to understand guide that explain perspective camera really well? I find libgdx severely lack of documentation regrading these.
\$\endgroup\$
0
\$\begingroup\$

was the game in the screenshot rendered with perspective camera or just the grids?

I think it's 2D. Just because of there're no true 3D objects.

Is it possible to work with Orthographic and Perspective Camera at the same time?

Yes, it is possible. Example and explanation.

Is there any detailed and easy to understand guide that explain perspective camera really well?

Very good tutorial about cameras in libgdx: here

More links about mixing 2D and 3D

\$\endgroup\$
0
\$\begingroup\$

I found this link to a blog by Mario Zechner on the Camera classes:

https://web.archive.org/web/20200427232345/https://www.badlogicgames.com/wordpress/?p=1550

\$\endgroup\$
1
  • 1
    \$\begingroup\$ Welcome to GDSE & thanks for contributing. Links are great, but a good answer should be self contained - they should help solve the problem even if the links go dead. Please consider editing your answer to summarize the information you linked to. \$\endgroup\$
    – Pikalek
    May 17 at 1:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.