Jawad Amjad
Jawad Amjad

Reputation: 2552

Sprite not rotating after scaling in AndEngine

There is a circle I want to rotate. If it is not scaled its rotates perfect but when it is scaled it is not rotating on its center point. I am using .setsize(--) function to scale and .setrotation(-) function to rotate. Can any one give me the solution??

Upvotes: 0

Views: 735

Answers (1)

jmroyalty
jmroyalty

Reputation: 2527

After you scale the Sprite and before calling setRotation(), be sure and call

yourSprite.setRotationCenter(pRotationCenterX, pRotationCenterY)

Upvotes: 3

Related Questions