cocos2d-iphone  2.1
Improved Cocos2D API Reference (iOS version) for developers
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Defines
CCPhysicsSprite Class Reference

#import <CCPhysicsSprite.h>

+ Inheritance diagram for CCPhysicsSprite:
+ Collaboration diagram for CCPhysicsSprite:

List of all members.

Protected Attributes

BOOL _ignoreBodyRotation


BOOL ignoreBodyRotation

Detailed Description

A CCSprite subclass that is bound to a physics body. It works with:

  • Chipmunk: Preprocessor macro CC_ENABLE_CHIPMUNK_INTEGRATION should be defined
  • Objective-Chipmunk: Preprocessor macro CC_ENABLE_CHIPMUNK_INTEGRATION should be defined
  • Box2d: Preprocessor macro CC_ENABLE_BOX2D_INTEGRATION should be defined

Features and Limitations:

  • Scale and Skew properties are ignored.
  • Position and rotation are going to updated from the physics body
  • If you update the rotation or position manually, the physics body will be updated
  • You can't eble both Chipmunk support and Box2d support at the same time. Only one can be enabled at compile time

Property Documentation

- (BOOL) ignoreBodyRotation [read, write, assign]

Keep the sprite's rotation separate from the body.

The documentation for this class was generated from the following file: