I'm trying to retrieve two separate bounding boxes from 2 different skeletons to test collision between them. My issue is it seems the function 'spSkeleton_getAttachmentForSlotName' returns the same bounding box, no matter which skeleton was passed to it. Meaning, if I pass a player character's skeleton to the function to grab that skeleton's bounding box, and then I pass an ai character's skeleton to get it's bounding box, both bounding boxes retrieved from both skeleton's have the same address. So I can't test collision with them. Is this normal behavior or is there something else maybe wrong in my program? Code is below:
spAnimationState_apply(player->animationState, player->skeleton);
spSkeleton_updateWorldTransform(player->skeleton);
spAnimationState_apply(ai->animationState, ai->skeleton);
spSkeleton_updateWorldTransform(ai->skeleton);
spBoundingBoxAttachment* playerCollisionBox = (spBoundingBoxAttachment*)spSkeleton_getAttachmentForSlotName(player->skeleton, "collision-box", "test-box");
spBoundingBoxAttachment* aiCollisionBox = (spBoundingBoxAttachment*)spSkeleton_getAttachmentForSlotName(ai->skeleton, "collision-box", "test-box");
//playerCollsionBox == aiCollisionBox