code: function(obj) {
          var i;
          //if nothing passed, remove all attached objects
          if (!obj) {
              for (i = 0; i < this._children.length; i++) {
                  this._children[i]._parent = null;
              }
              this._children = [];
              return this;
          }
  
          //if obj passed, find the handler and unbind
          for (i = 0; i < this._children.length; i++) {
              if (this._children[i] === obj) {
                  this._children.splice(i, 1);
              }
          }
          obj._parent = null;
  
          return this;
      }
docs: @
  #.detach
  @comp 2D
  @kind Method
  
  @sign public this .detach([Entity obj])
  @param obj - The entity to detach. Left blank will remove all attached entities
  
  Stop an entity from following the current entity. Passing no arguments will stop
  every entity attached.