QueryAABB and custom callbacks....

I have spent ages looking through posts on this issue and I am still having problems with the callbacks...

I want to find if a body is resting on another....

Code:
b2Body *guy;
void check_jump(void)
{
   b2AABB aabb;
   b2Vec2 guy_pos;
   b2QueryCallback *callback;

   guy_pos = guy->GetPosition();
   aabb.lowerBound.Set(guy_pos.x - 0.01, guy_pos.y - 0.015);
   aabb.upperBound.Set(guy_pos.x + 0.01, guy_pos.y - 0.010);

   world->QueryAABB(callback, aabb);

//   if (callback.contact)
      there is contact = 1;
}


This is the idea but I don't know how to customize it to return if there is a contact...

Thanks
b2QueryCallback is a base class, you need to implement your own class that derives from b2QueryCallback. There are examples in the testbed.

Original thread: https://box2d.org/forum/viewtopic.php?t=5600