public void addChild(WorldObject object) {
    
        if (object == null) return;
        if (children.contains(object)) return;
        WorldObject p = getParent();
        while (p != null) {
            if (p == this) {
                new KatamaException("Cannot add an object as a relative of itself!", "Object: " + this).printStackTrace();
                System.exit(-1);
            }
            p = p.getParent();
        }
        
        children.add(object);
        object.setParent(this);
    }