Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I am new to Cocos2D and I've realized that most of the codes written before the Cocos2d update used CCSprites. Recently I realized a lot of more recent codes after the update are using PhysicsSprite. What is the difference? What advantages does one have over the other, if any?

share|improve this question
add comment

1 Answer

PhysicsSprite is a CCSprite which uses a physics body to control the sprite's motion (position) and rotation.

Depending on whether you start with the Box2D or Chipmunk template, PhysicsSprite will either have a b2Body (Box2D) or a cpBody/cpShape (Chipmunk) as instance variables.

If you're not planning to use physics, use CCSprite. If you do, use PhysicsSprite for those sprites which represent physics objects.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.