Context: I am using 2 sprites of 35x5 one on top of other.
Problem: On some event i am rescaling the top sprite to 50 %. It gets rescaled but its dimensions remains same and it lies in centre of lower sprite. Think of 2 bars. Top bar getting half and then setting in centre of bottom bar.
What i want: I want to set the starting position of top bar same to bottom bar. so that top bar resides at most left or most right.
What have i tried: On some event, i have called the below function but nothing happens except a fluctuation.
Bar.setPosition(SomeOtherSprite.getPosition().x, SomeOtherSprite.getPosition().y+SomeOtherSprite.getContentSize().height/2 + Bar.getContentSize().height/2+2);
Just for the info, that i have started on Cocos2d for Android some 2 days before. Putting a question in effort to get most material regarding Cocos2D in Android on Internet as i was unable to find except : Tutorial for Cocos in Android