manns41078
New member
- Joined
- Sep 9, 2013
- Messages
- 1
Hello!
I've been working on this problem all day and can't quite get the result I need.
I'm designing a game that has a "gambling wheel" in it, much like a roulette wheel, but simply 8 divisions.
The problem is that I want to fix where the wheel will land, yet make it appear as if it were up to random chance.
The wheel must also slow its angular speed over time.
I'm currently using a simple linear equation to reduce the speed until a certain point:
speed = 1 - time / 5 seconds
Once the speed hits something like 50 degrees per second I then begin increasing the "5 second" divisor in the above equation by 1 millisecond approximately every 1/60th of a second.
This gives me a nice smooth slow down, but I'd like to be able to determine how many seconds are required in order to land on a specific spot.
I'm thinking I may need to have the program go through the calculation before the actual spin starts, but if there is a way to do this upfront with algebra then it will save me some program resources.
Thanks in advance for any help you're able to provide!
I've been working on this problem all day and can't quite get the result I need.
I'm designing a game that has a "gambling wheel" in it, much like a roulette wheel, but simply 8 divisions.
The problem is that I want to fix where the wheel will land, yet make it appear as if it were up to random chance.
The wheel must also slow its angular speed over time.
I'm currently using a simple linear equation to reduce the speed until a certain point:
speed = 1 - time / 5 seconds
Once the speed hits something like 50 degrees per second I then begin increasing the "5 second" divisor in the above equation by 1 millisecond approximately every 1/60th of a second.
This gives me a nice smooth slow down, but I'd like to be able to determine how many seconds are required in order to land on a specific spot.
I'm thinking I may need to have the program go through the calculation before the actual spin starts, but if there is a way to do this upfront with algebra then it will save me some program resources.
Thanks in advance for any help you're able to provide!