Author: Tankor Smash

Here's how you scale the back sprite to match the front sprite's size, accounting for scaling. front_sprite->setScale(4.0f); Size front_size = front_sprite->getContentSize(); float front_x = front_sprite->getScaleX(); float front_y = front_sprite->getScaleY(); Size back_size = back_sprite->getContentSize(); back_sprite->setScale( front_size.width*front_x/back_size.width, front_size.height*front_y/back_size.height );

Read more