Hi, I believe there is an issue with :spSkeletonBounds_update in the context of cocos2d.
Basically I want to work out the height of the character at certain time in the animation before playing the animation:
// First get the height of the avatar by working out the distance between min and max
[[somelayer animation] setFrameForAnimation:someanimation withTime:0.6];
[somelayer getSnippetHeight];
[[somelayer animation] setFrameForAnimation:someanimation withTime:0.0];
[somelayer setVisible:YES];
[somelayer setPosition:ccp(posX, posY)];
[[somelayer animation] setScale:self.somelayerscale];
[[somelayer animation] setAnimationForTrack:0 name:someanimation loop:NO];
(void)getSnippetHeight
{
spSkeletonBounds *bounds = spSkeletonBounds_create();
spSkeletonBounds_update(bounds, [animation skeleton], 1);
NSLog(@"min: %f, max: %f", bounds->minY, bounds->maxY);
spSkeletonBounds_dispose(bounds);
}
The problem:
It keeps reporting the max and min from the setup pose rather than from the time in the animation from which I want it.
Thank you in advance