java - Rotate sprite on sprite pixel level, not screen pixel level, in LibGDX -
i'm making pixelated game, , i'm trying rotate sprite. however, i'm not achieving sort of rotating effect i'm aiming for.
currently, sprite looks when rotates:
as can see, rotates relatively smoothly. can see 'big pixels' rotate smoothly. however, isn't rotating effect i'm looking for. instead, how want rotate:
however, preferably in way doesn't distort pixels much. can see difference. want actual 'big pixels' rotate, not 'screen pixels'.
i think issue might lie in how scale pixels become bigger. i'm doing, i'm zooming camera in, moving closer sorta. instead want do, render normal, scale screen pixels. way i'd automatically achieve rotation effect want. don't know how that, though.
this how 'scale pixels':
camera = new orthographiccamera(); camera.settoortho(false, 1280 / 4, 720 / 4);
the game's resolution 1280x720, way make pixels bigger zoom in 4x times. however, instead want do, render normal, stretch screen 4x times.
any on how appreciated.
have @ this post. here kind of solution problem. render first small frame buffer nearest neighbor interpolation , screen. perhaps not effective way, way achieve such behavior.
good luck!
Comments
Post a Comment