This answer is providing a detailed way of doing it with a playground sample:
You might also find this post useful:
Those are quite hard topics but I guess a doc entry would be great @PirateJC, I can not find it back for @Drigax PG