AndEngine icon indicating copy to clipboard operation
AndEngine copied to clipboard

Problem with Rotation on scaled sprite

Open DrDerico opened this issue 12 years ago • 0 comments

Issue for GLES2-Anchor-Center: When I apply scale to sprite other than 1 and setRotationCenter not to (0.5f, 0.5f), sprite rotates around wrong rotation center. If scale = 1, sprite rotates correctly.

May be problem in method Entity.applyRotation ? I see this comment there:

/* TODO There is a special, but very likely case when mRotationCenter and mScaleCenter are the same.

  • In that case the last glTranslatef of the rotation and the first glTranslatef of the scale is superfluous.
  • The problem is that applyRotation and applyScale would need to be "merged" in order to efficiently check for that condition. */

Thank you

DrDerico avatar Jul 07 '13 09:07 DrDerico