             child.body.instance()
         return n
 
+    set_parent: (parent, options) ->
+        if @parent?
+            @scene.clear_parent this, options
+        @scene.make_parent parent, this, options
+
     parent_to: (parent, options) ->
         if @parent?
             @scene.clear_parent this, options

        # Adding children after ensures objects don't need to be sorted
        if recursive
            for child in @children
                child = child.clone(options)
                child.parent = n
                children.push child
        n.body.instance()

    clear_parent: (options) ->
        @scene.clear_parent this, options

    get_top_ancestor: (top_level_parents=[]) ->
        ob = this
        while ob.parent? and ob.parent not in top_level_parents
            ob = ob.parent
        return ob

    get_descendants: ->
        children_lists = [@children]
        @_fill_children_lists_recursive children_lists
        return Array.concat children_lists

    _fill_children_lists_recursive: (children_lists) ->
        for c in @children
            children_lists.push c.children
            c._fill_children_lists_recursive children_lists
        return

    load: (options) ->
        return @scene?.load_objects [this], options

    load_recursive: (options) ->
        return @scene?.load_objects @get_descendants(), options

    # Removes the object from the scene. It does NOT delete the object itself.
    remove: (recursive) ->
