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

Popular posts from this blog

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -