Finding images attached to a specific body
Finding images attached to a specific body
In b2dJson any way to do get image attached to b2Body? something like json.getImageByB2Body(b2Body* body)
Re: rube b2dJson
You could loop over all images to find those with a matching body:
Code: Select all
std::vector<b2dJsonImage*> allImages;
json.getAllImages( allImages );
for (int i = 0; i < allImages.size(); i++) {
if ( allImages[i]->m_body == theBody )
// do something with allImages[i]
}