java - Rotate Atlas Region Libgdx -
protected textureatlas atlas = assets.manager.get(constants.atlas_path, textureatlas.class); atlasregion region = interfaceatlas.findregion("arrow"); i've load image (http://marinedealerconference.com/wp-content/uploads/2015/07/right.png): arrow points right...
but can't find way rotate it! how can i? because want goes down.
you cannot rotate region although can rotate sprite or image
//sprite: public void rotate(float degrees) //image - remember set origin center here! public void rotateby(float amountindegrees) instead of rotating region can "tell" spritebatch draw rotated:
batch.draw(region, x, y, originx, originy, width, height, scalex, scaley, rotation);
Comments
Post a Comment