I have a rectangular shape like a bar, i want it to be hanged and swinging in both direction continuously (a bomb is thrown in may game and this is opening and closing the path) how can i implement this in cocos2d space mana开发者_StackOverflow社区ger also how can i make a similar bar rotating around its center (a center as a pivot point)
You could use CCActionMoveBy
or CCActionMoveTo
for moving one side to another the CCSprite
and CCActionRotateTo
or CCActionRotateBy
to rotate (in case you don't want it to collide using Box2D or Chimpunk).
精彩评论