How do I make a wheel that snaps in 12 places like a clock?
xyloFUN
Member Posts: 1,593
Hey gang,
I am trying something different ...
Does anyone have a link for a tutorial that teaches how to make a "rotating dial"?
I'm trying to create a game that has a wheel or disk which needs to be rotated. But it would be cool if I could snap to certain angles kind of like a clock. Once the snap takes place I'd like to trigger a sound.
Thanks
I am trying something different ...
Does anyone have a link for a tutorial that teaches how to make a "rotating dial"?
I'm trying to create a game that has a wheel or disk which needs to be rotated. But it would be cool if I could snap to certain angles kind of like a clock. Once the snap takes place I'd like to trigger a sound.
Thanks
Comments
Go back and read the math section!
floor and modulo is one way to do it.
The hour hand spins 360°.
There are 12 hours.
So, that's 30° per hour.
What do you think the formula would be?
Yes, I have your book but .... all the apps I have done so far function exactly the same and therefore I have not done that much reading.
Alright, I will snoop around in the math section!
Although I was hoping for a youtube link because I'm a visual learner.
I could add video to the app, but that would push it over the 20 MB download limit.
Also, that's not true learning. If you can figure out how to use these basic math functions to add special effects, your mind can think in new ways. I don't want to just give you the answer. You can figure this out
Math is not useless programming knowledge either. It's not going to be replaced by some over-hyped computer language in two years from now. It's MATH, one of the cornerstones of human civilization.
OK, back to the future!
I've looked over the scribbles and the wheel does not have to snap. As long as I can rotate it in both directions and trigger a sound at 12 positions, I'm ok.