         if n.materials and scene != this.scene
             for i in [0...materials.length]
                 n.materials[i] = materials[i].clone_to_scene scene
-        
+
         n.scene = null
         scene?.add_object n, @name
         if behaviours

        # 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()

        n.avg_poly_area = @avg_poly_area
        n.avg_poly_length = @avg_poly_length
        n.behaviours = []
        if new_parent?
            n.parent = new_parent
            n.parent.children.push n
        @body._clone_to(n)

        # Warning! This only works reliably
