@satyaKT wrote:
Hello there,
I am trying to get the size of node which is created from spine,but i am getting my width and height as 0.
Here is my codeSize s = Director::getInstance()->getVisibleSize(); auto SpineNode1 = SkeletonAnimation::createWithFile("skeleton.json", "skeleton.atlas", 0.5f); SpineNode1->setPosition(Vec2(s.width/2,s.height/2)); auto rect1 = SpineNode1->SkeletonRenderer::getBoundingBox(); auto s1 =rect1.size; CCLog("width =%f,height = %f",s1.widht,s1.height); CCLog("minX = %f,maxX = %f",rect1.getMinX(),rect1.getMaxX());
every time in the log i am getting log as width=0.000000,height=0.000000
minX = 360.000000,maxX = 360.000000
am i doing any thing wrong or is there any other way to get the size of node created from spine?Thanks!
Posts: 1
Participants: 1