Hi, how can I add a child (an emitter in my case) to a spine model? I can obtain a slot, but it's not a Node class object.
I've found something like this:
void MyScene::update(float delta){
auto bearBone = spSkeletonData_findBone(bear->getState()->data->skeletonData, "konewka");
CCLOG("%f, %f, %f, %f", bearBone->x, bearBone->y, bearBone->shearX, bearBone->shearY);
}
But even when playing animation slot is moving it's still returning the same result.
P.S. I'm using cocos2d-x 3.14 with latest spine runtimes.
piotrros escreveuHi, how can I add a child (an emitter in my case) to a spine model? I can obtain a slot, but it's not a Node class object.
I've found something like this:
void MyScene::update(float delta){
auto bearBone = spSkeletonData_findBone(bear->getState()->data->skeletonData, "konewka");
CCLOG("%f, %f, %f, %f", bearBone->x, bearBone->y, bearBone->shearX, bearBone->shearY);
}
But even when playing animation slot is moving it's still returning the same result.
P.S. I'm using cocos2d-x 3.14 with latest spine runtimes.
Problem solved. So there's a bone and boneData..
auto bearBone = spSkeleton_findBone(bear->getSkeleton(), "konewka");
and then:
bearBone->worldX, bearBone->worldY