bool GameScene::init(int itemid)
{
if (!Scene::initWithPhysics())
{
return false;
}
/if (!this->initWithPhysics())
{
return false;
}/
this->getPhysicsWorld()->setDebugDrawMask(PhysicsWorld::DEBUGDRAW_ALL);//设置debug
this->getPhysicsWorld()->setGravity(Vec2::ZERO);//设置重力
auto lay = GameLayer::create(itemid);
this->addChild(lay);
//this->getPhysicsWorld()->setAutoStep(false);
//scheduleUpdate();
return true;
}
加入cocos自带的物理引擎后,使用没有什么大问题 但是加入setAutoStep后屏幕上什么东西都没有了。查看是所有node的坐标变成了898658565这么多。。。坐标完全不对了。怎么搞的