How do I made a randomised Spinning Wheel

SarahGSarahG Member Posts: 0

I have a wheel and have figured out to rotate it, but it keeps rotaing. How do I get it to stop randomly, and win points, like in this tutorial:

Comments

  • TosanuTosanu Member, PRO Posts: 388

    It depends on how natural you want it to look.

    My instinct is to do it like this. Set up a random number generator to trigger after the rotation begins, (1, number of spaces), this will decide what space wins. Then use that number to set up each specific stop, probably by interpolation the angular velocity down for about 5 seconds to simulate slowing down and then interpolating the rotation to the exact spot needed. You may be able to do it in one expression if you set it up just right (for example, lets imagine there are 12 numbers. Divide 360 by 12 and you get 30, so each wedge is 30 degrees across. Make the final interpolation (Interpolate to rotation (30 * Random Number) and it should stop just right.)

  • SocksSocks London, UK.Member Posts: 12,822

    I'd interpolate to a random angle, like this:

    Link: https://www.mediafire.com/?7u4u6jg996hk7f2

Sign In or Register to comment.