简体   繁体   中英

LibGDX GraphicBug TiledMap OrthographicCamera

i'm working on IT project and I meet one bug, that resists.

My Project is a 2D game in LibGDX, and I use TiledMap(logicial) for create the maps. And an OrthographicCamera for render the screen.

But when I'm running on the map (with the player), "lines" often appear (vertical or horizontal) like here :

在此处输入图片说明

And I can't figure out what is the problem, especially as it does not happen all the time.

If anyone can help me, it would be greatly appreciated !

Thx !!! My solution (based on your comments) is to round (2.12546 => 2.12) the position of the camera and round (2.12546 => 2.1) the zoom of camera, and it is solved !! THX !

PS : Just, I don't know why, just if I put a zoom at 4.0, I can see a vertical ligne for all tiles around the player.. It's weird.

But for me is ok for now !! thx again :D

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