This code is part of my Vision OS tutorial series at https://visionos.substack.com
DISCLAIMER: The intention of this tutorial is not to always write the best possible code but to show different ways to create a game or app that even can be published. I will also refactor a lot during the tutorial and improve things step by step or even show completely different approaches.
Feel free to use the code in the way you want :)