Position polygon sprite from SpriteFrameCache

Position polygon sprite from SpriteFrameCache
0

Hello, I just changed my sprites from quad sprites from different sources to polygon sprites from .plist with the class SpriteFrameCache, so I am having troubles because they change their original position.

For example I have a plane propeller with animation frames, which before was

50 width x 4 height on 4 frames constantly on the animation

but now with its polygon applied, changes between

16 x 4 to 18 x 4

and looks like its shaking, I don’t know why if I have its anchor point at (0.5, 0.0) so that shouldn’t happen in theory, maybe…

Is there a different way of positioning sprites when they are poligon sprites?
Can I refer to the original frame to position them?

Nevermind guys, I found the solution, now I use:

getSpriteFrame()->getOriginalSize().width
getSpriteFrame()->getOriginalSize().height

instead of what I was using:

getSpriteFrame()->getRect().getMaxX()

1 Like