tags:

views:

481

answers:

2

I'm trying to scale a sprite with "ScaleTo" and "SpriteBy" but as it's growing it's "floating away". For example let's say I have a circle, and I would like the circle to double it's radius each time it's clicked.

Right now my circle is growing, but it looks as though the circle is scaling about the origin/bottom left corner of the sprite. I tried changing the anchorpoint to

circlesprite.transformAnchor = cpv(mysize.width/2, mysize.height/2 );

but that didn't work either. Any ideas?

A: 

Got it, I was just confused. The bug had nothing to do with this part of the code.

Stu
A: 

Er hello, could you PLEASE show me your code? I need to learn how to scale a sprite.