-
pnyusbLikes 0Problem Description
Hello, I use setSclale for my sprite like this but when I want to scale my physic body, I use this : auto physicsBody = PhysicsBody::createBox(sprite->getContentSize()); .
It works, but I don’t understand why it doesn’t work with sprite->getBoundingBox().size then it seems more logical.
-
Sonar Systems adminLikes 0
What do you get?
-
pnyusbLikes 0
When I use getBoudingBox().size, the physic body is bigger than the sprite.
-
Sonar Systems adminLikes 0
Is that after the scaling?
-
pnyusbLikes 0
yes. It works with getContentSize().size however I thought it would work with getBoudingBox()
-
Sonar Systems adminLikes 0
Bounding box size is independent.
Login to reply