Click to See Complete Forum and Search --> : Best way to create a roulette wheel spining
aidanmack
01-18-2009, 05:59 PM
Hi,
Could any body give me an idea on the best way to make a roulette wheel spin and then have the ball land on a number?
It needs to be given a number before it spins and when it finishs spinning for the ball to land on that number.
Im just not sure what the easiest way to do it is.
Aidan
This could be very interesting and very possible....I think
I can't go into complete detail as this is a very complicated thing to do.
First you would need to create an update method that rotated the roulette wheel and gradually slowed it down. You would also need a function to rotate the ball around the wheel as well and based on the number you give it slow them down evenly until the speed of both is slow enough and the ball can land on the proper space.
This can be very complex and require a lot of code and a lot of thinking :)
I hope you have enough Tylenol for this one.
aidanmack
01-19-2009, 07:50 AM
hmm i made it a bit more simple!
i have the ball and wheel rotate, after 6-7 seconds i activate a hit test on a box box sat a little further round from the number i want the ball to land on.
When the ball passes over the hit test box an animation is activate showing it land on the number.
Thing is though does anyone now how to add some code that will make it ease?
I want the wheel to slowly speed up and slowly slow down. any one no the code for this?
Cheers
Aidan
flashkit.com
Copyright Internet.com Inc., All Rights Reserved.