I have noticed that the result of
1- sprite->getContentSize()
and
2- sprite->getBoundingBox().size()
are different when scaling is involved usually the content size is smaller in value than the bounding box. I would appreciate it if someone could explain to me what the difference is between the two.
Here is what I observed. In case i do not scale my sprite I get the same results from sprite->getContentSize()
and sprite->getBoundingBox().size()
. However if I scale my sprite in the following way
s->setScaleX((screenSize.width / s->getContentSize().width) * 1); //where screenSize is the Visible size
then the bounding box size is greater than the content size. Why is that ?