posted by pflower 2015. 12. 3. 17:31

class foo extend Actor {

...


@Override

        public void draw(Batch batch, float parentAlpha) {

            batch.end();


            mPolygonSpriteBatch.setTransformMatrix(batch.getTransformMatrix());

            mPolygonSpriteBatch.begin();


            sprite.draw(mPolygonSpriteBatch);


            mPolygonSpriteBatch.end();


            batch.begin();

        }

...

}


It is very simple, I suddenly know while I saw the core libgdx source code.

we need transformation matrix to applying it.

and the transformation matrix is automatically generated when we call the mutators 

(to rotate, shift, scaling)

for Actors. and it passed by tree like manner.


so, what we have to do is just pick the transformation matrix of Actor (by batch parameter) 

and applying it to the batch object whatever we want.


that's all