In the Cloth tag:
– Go to the Dresser tab, drag the flagpole into the Belt On field.
– Go into Point mode, select the points of the flag mesh on the side that attaches to the flag pole.
– Next to Belt Points click “Set”. The points should turn “yellow” indicating that they are now acting as a “belt”, meaning they are attached to those points.
– Go to the Tag tab, and make sure Self Collision is turned on.
– Click on Empty Cache.
– Click on Calculate Cache. The simulation should now cache in, and play through.
If you want to make any changes before rendering, be sure to click Empty Cache before starting your changes.