• Editor
  • Please Check this video. (spine on cocos2d-x)

  • Изменено
Related Discussions
...

Dear spine.

Please check this youtube video. (spine on cocos2d-x2.1.4)

http://www.youtube.com/watch?v=CDlhDDN-fkc

iOS : Good working!
Android : OMG!

Have you a any plan to fix this bug?

No idea what the bug could be. Maybe your resources are messed up somehow? It's the same Spine code that runs in both places.

I find a reason.

CCDirector *pDirector = CCDirector::sharedDirector();
pDirector->setOpenGLView(CCEGLView::sharedOpenGLView());


CCSize screenSize = CCEGLView::sharedOpenGLView()->getFrameSize();
CCSize designSize = CCSizeMake(480, 320);

std::vector<std::string> searchPaths;


if (screenSize.height > 320)
{
    searchPaths.push_back("hd");
    searchPaths.push_back("sd");
    
    pDirector->setContentScaleFactor(640.0f/designSize.height);
}
else
{
    searchPaths.push_back("sd");
    pDirector->setContentScaleFactor(320.0f/designSize.height);
}

  
CCFileUtils::sharedFileUtils()->setSearchPaths(searchPaths);
 


CCEGLView::sharedOpenGLView()->setDesignResolutionSize(designSize.width, designSize.height, kResolutionShowAll);

After setContentScaleFactor function call.. It make a this bug.
🙂

His problem is he's messing around with different resolution source assets... don't think spine is the problem.

I've seen that problem when loading the wrong sprite sheet and atlas combo. All the coordinates are wrong, thus the problem.