Spinning Wheel with Random Result

MightyBooshMightyBoosh Member Posts: 83
edited November -1 in Working with GS (Mac)
Ahoy Ahoy
I want to make a wheel of fortune / road trip (arcade game) type spinning wheel that spins with ether the users touch or by shaking the iphone (whatevers easier really)

It needs to go hard at the start then slow down as it loses momentum, eventually stopping and giving a result

I have zero idea how to do this can someone point me in the right direction?

Cheers

Comments

  • MightyBooshMightyBoosh Member Posts: 83
    *** I have sort of solved the issue, but would still appreciate any advice
  • CaptainChocoCaptainChoco Member, BASIC Posts: 124
    How did you solve that issue??? (Sorry, I'm no help... for now...)
  • firemaplegamesfiremaplegames Member Posts: 3,211
    For the rotation part you could use Interpolate with an ease out.
  • ShpintShpint Member Posts: 404
    share the solution please???
  • synthesissynthesis Member Posts: 1,693
    Solution:
    You need 2 attributes:
    self.startUpTime (real)
    self.slowDownTime (real)

    self.startUpTime=(random(100,400))*.01 (this will give you a number from 1 to 4 with 2 decimal places for more random results in your length of time to spin.
    self.slowDownTime=2*self.startUpTime

    Then use the first value to start the spin. After the startUpTime...switch to slow down.
    Allow the actor to slow rotation for the second length of time....probably interpolate will work best. Adjust the values as needed for smooth results. May require some tweaking/trial and error.

    Then have whatever ending actor rotation value results equate to a value on the wheel.

    Its a logic structure solution I have here...you all will have to work out the details as I don't really want to spend 2 or 3 hours to do so.
    Good Luck!
  • synthesissynthesis Member Posts: 1,693
    You also might try using this:
    place an interpolation behavior for:
    self.rotation to self.rotation*.05
    duration=self.startUpTime (ease in)

    (then inside a delay timer)
    try an angular drag ramp up interpolation (ease out) to slow the wheel rotation down to 0.
    Not sure about this idea without testing directly...but it might work.
Sign In or Register to comment.