简体   繁体   中英

Java libGDX disconnection from the camera

In the game I got the text, hero and opponent. The camera OrthographicCamera is focused on a hero so text moves around the screen. Can somehow be disconnected text from the camera? To be in one place.

You can use Two Cameras to achieve this easily. Keep one moving with the player, and keep one fixed to the screen.

Use the second one to draw only text.


Reference : Multiple cameras in libgdx ( probably similar in other frameworks )

Hope this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM