Add cloth simulation to moving pole (like flag)

the above like shows about cloth simulation
i just want to attach cloth to a pole (case:man waving a flag)
some times pole could be in different orientations.

please help

Altenative Create Soft Bodies - Babylon.js Documentation

Thanks for reply mate i think its good solution