I would like to get the position of each edge of a sprite when he has been rotated.

I have no idea how to do it, I made a image to explain it.

I would like to get the X and Y position of each Red circles please thanks you .

Sprite sprite = new Sprite(texture);

enter image description here


1 Answer 1


To get the rotated sprites coordinate simply call the getVertices() method.

For example: sprite.getVertices()[SpriteBatch.X2]

Gets you the X coordinates of the top left corner.

The same call but replacing X<number> with Y<number> gets you the Y coordinate.

The corner numbers go like this:

| |

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .