Tag: 花栗鼠

Cocos2d 3.0 + Chipmunk + CCAnimation:将animation物体移动到物体上。 怎么样?

我有一艘附有物理机构的船。 这艘船是静态的物理机构。 船从CCAnimateMoveTo移动从左到右。 当我点击屏幕时,我的angular色掉下来了。 我发现碰撞很好。 但是我想在碰撞后我的angular色就​​会落在船上,并继续前进。 人物是dynamic的身体。 链接到示例video: 示例video 我在这里创造一条船: – (void)createBoat { currentBoat = [CCSprite spriteWithImageNamed:@"Boat.png"]; currentBoat.position = ccp(0 – currentBoat.boundingBox.size.width, winSize.height * 0.2); // currentBoat.physicsBody = [CCPhysicsBody bodyWithRect:(CGRect){0, 0, currentBoat.contentSize.width, currentBoat.contentSize.height * 0.5} cornerRadius:0]; CGPoint shape[6]; shape[0] = ccp(0, 30); shape[1] = ccp(64, 10); shape[2] = ccp(128, 30); shape[3] = ccp(128, 0); shape[4] […]