我自己定义了一个TreeWidget,其中有一个Spine的SkeletonAnimation的属性。可是我在初始化了TreeWidget之后,getBoundingBox一直返回是0.求解啊!如下:
sprite->setPosition(
treeWidget->getBoundingBox().getMidX(),
treeWidget->getBoundingBox().getMaxY());
谢谢大家!
我自己定义了一个TreeWidget,其中有一个Spine的SkeletonAnimation的属性。可是我在初始化了TreeWidget之后,getBoundingBox一直返回是0.求解啊!如下:
sprite->setPosition(
treeWidget->getBoundingBox().getMidX(),
treeWidget->getBoundingBox().getMaxY());
谢谢大家!
在spine的那个编辑器 可以设置boundingBox的…应该是你没有设置 所以出来的都是0
那如果在spine软件中设置了,我这边scale后,boundingBox也会变化吗?
这样的 我刚刚试了一下 貌似不用设置boudingbox也可以拿到, 要在create出来后的一帧去拿就可以了, 然后boundingbox是会随着scale变化而变化的
那是在update方法里去拿吗?