求教!碰撞区域的显示框在场景0,0位置为什么?

ArmatureDataManager::getInstance()->addArmatureFileInfo("HeroAction/heroAction.ExportJson");

//创建node10003上要使用的动画
pkArmature10003 = Armature::create("heroAction");
ComRender* armature10003 = ComRender::create(pkArmature10003,"CCArmature");

//创建node10004上要使用的动画
pkArmature10004 = Armature::create("heroAction");
pkArmature10004 -> setScaleX(-1.0);    
ComRender* armature10004 = ComRender::create(pkArmature10004,"CCArmature");

//node10003上赋值动画
node10003 -> addComponent(armature10003);

//node10004上赋值动画
node10004 -> addComponent(armature10004);

以上为加入的动画,编译运行没问题,但发现碰撞框在左下角,而且是显示一部分,
应该是锚点在0,0然后碰撞框中心与锚点重合,显示出碰撞框的右上部分。
为什么会这样~~~~~~~~~~~~~~~~~~~~~~~~~~~~~?
node10003
node10004
这两个是在场景编辑器里面设定好的空的node,是固定位置,然后给这两个位置加上动画Armature。
放个图不知道能不能看清楚,左下方的线条是碰撞框

您好,请问您是否使用的是序列帧动画?如果是序列帧动画建议不要使用碰撞区,因为在物理引擎中如果快速切换碰撞区将会导致碰撞区信息错乱。感谢您对CocoStudio的支持。

碰撞区都删除了,那个是,动画编辑器的这个动画里面没有碰撞区域
void PKScene::draw()
{
pkArmature10003->drawContour();
pkArmature10004->drawContour();
}
画出来的框,还没做碰撞!
就是加到NODE然后显示下动画的框,准备用普通矩形碰撞

您好,请问您将碰撞添加到了哪里呢?是armature本身还是 ?

我上周也遇到了同样的错误,我做的是序列帧动画当作技能使用,在释放技能时,对Armature所在的层进行了移动(我的Armature封装在技能类,而技能类继承自Layer),也出现了碰撞区永远在(0,0)的问题

碰撞区是在编辑器里添加的,然后我给删了都。
就相当于做了动画但是没有碰撞区,然后运行,显示下pkArmature10003->drawContour();
如果没做碰撞区就不会有框了吗???

版主,我把碰撞区都删了左下角那啥也没有了,但是我要在代码里怎么加矩形碰撞区呢?既然序列帧不能用编辑器加碰撞区,就只能在代码里加矩形碰撞了吧?
能给找个例子吗?我照的那个就在打枪前面是个牛仔的框的碰撞区做的那个,他的矩形碰撞区没看到在哪添加啊
http://www.cocoachina.com/bbs/read.php?tid=189665
就是这个,他的碰撞区的框是在代码加的还是在动画编辑器里加的?
求教代码怎么加碰撞区,就是普通的矩形碰撞区

请问您使用的哪一个物理引擎呢?关于这个教程的物理碰撞部分内容可以参考:https://github.com/chukong/CocoStudioSamples/blob/master/SampleCollision/Classes/TestColliderDetector.cpp

如box2d部分:

//! init physic world
b2Vec2 noGravity(0, 0);

world = new b2World(noGravity);
world->SetAllowSleeping(true);

listener = new ContactListener();
world->SetContactListener(listener);

debugDraw = new GLESDebugDraw( PT_RATIO );
world->SetDebugDraw(debugDraw);

uint32 flags = 0;
flags += b2Draw::e_shapeBit;
//        flags += b2Draw::e_jointBit;
//        flags += b2Draw::e_aabbBit;
//        flags += b2Draw::e_pairBit;
//        flags += b2Draw::e_centerOfMassBit;
debugDraw->SetFlags(flags);


//! Define the dynamic body.
//! Set up a 1m squared box in the physics world
b2BodyDef bodyDef;
bodyDef.type = b2_dynamicBody;

b2Body *body = world->CreateBody(&bodyDef);

//! Define another box shape for our dynamic body.
b2PolygonShape dynamicBox;
//define bullet's body shape
dynamicBox.SetAsBox(.5f, .5f);

//! Define the dynamic body fixture.
b2FixtureDef fixtureDef;
fixtureDef.shape = &dynamicBox;
fixtureDef.isSensor = true;
body->CreateFixture(&fixtureDef);

//! set body to bullet and add it to world
bullet->setB2Body(body);
bullet->setPTMRatio(PT_RATIO);
bullet->setPosition( ccp( -100, -100) );

body = world->CreateBody(&bodyDef);
armature2->setB2Body(body);

CHIPMUNK引擎:

//! create physic space
space = cpSpaceNew();
//! set space gravity as no gravity
space->gravity = cpv(0, 0);

//! Physics debug layer
CCPhysicsDebugNode *debugLayer = CCPhysicsDebugNode::create(space);
this->addChild(debugLayer, INT_MAX);

//! get size of bullet
CCSize size = bullet->getContentSize();

//! define bullet's collider body
int num = 4;
cpVect verts] = {
    cpv(-size.width/2,-size.height/2),
    cpv(-size.width/2,size.height/2),
    cpv(size.width/2,size.height/2),
    cpv(size.width/2,-size.height/2),
};

//! build body as verts' shape
cpBody *body = cpBodyNew(1.0f, cpMomentForPoly(1.0f, num, verts, cpvzero));
cpSpaceAddBody(space, body);

cpShape* shape = cpPolyShapeNew(body, num, verts, cpvzero);
shape->collision_type = eBulletTag;
cpSpaceAddShape(space, shape);

bullet->setCPBody(body);

//! define armature2's body,get shape from armature data
body = cpBodyNew(INFINITY, INFINITY);
cpSpaceAddBody(space, body);
armature2->setBody(body);

shape = body->shapeList_private;
while(shape){
    cpShape *next = shape->next_private;
    shape->collision_type = eEnemyTag;
    shape = next;
}

cpSpaceAddCollisionHandler(space, eEnemyTag, eBulletTag, beginHit, NULL, NULL, endHit, NULL);