I had the idea to make a system of a wheel of selection that can work with a lot of parameters.
I started by doing a mesh generation of circular sectors that worked, but it was not optimized at all and could have a lot of inaccuracies.
Then I started to think about a solution that would use angles with the help of the unit circle.
The way my system works is the following :
- I create the number of segments and give them their rotation to be placed correctly, and their angle to compare to the angle of the user input.
- I then look for the user's input and retrieve the angle from the center of the screen.
- Finally I send this angle to a loop that enable the segment where the angle is correct, and disable the others.
- I then look for the user's input and retrieve the angle from the center of the screen.
- Finally I send this angle to a loop that enable the segment where the angle is correct, and disable the others.
There was a lot of notions and calculs that I didn't know about, but I managed to learn them with some help, and created something that works and is easy to configure. I really enjoyed creating something that started in my mind, I didn't take references and it came out really good.