code: function (event) {
          if (this.selected === false) {
              // manually calculate the relative coordinates for the body shapes
              // since only the bounding box is used by the input event manager
              var parentPos = this.ancestor.getBounds().pos;
              var x = event.gameX - this.pos.x - parentPos.x;
              var y = event.gameY - this.pos.y - parentPos.y;
  
              // the pointer event system will use the object bounding rect, check then with with all defined shapes
              for (var i = this.body.shapes.length, shape; i--, (shape = this.body.shapes[i]);) {
                  if (shape.containsPoint(x, y)) {
                      this.selected = true;
                      break;
                  }
              }
              if (this.selected) {
                  this.grabOffset.set(event.gameX, event.gameY);
                  this.grabOffset.sub(this.pos);
                  this.selected = true;
              }
          }
          return this.seleted;
      }
docs: mouse down function