- Home /
Slot Machine help spinning/finding reel image
So i have read all the questions on slot machines here and im still stumped on how to "rotate" the reel to get an image to appear and know what that image is. I have seen things about texture offset, sprites, rotating the actual object, but while i could implement maybe the rotation of an object and get the number. I feel is not very "clean". I dont know how to do the other methods or even where to begin with them. Help? Code/a guide would be the most help. Thank You
You could just try and predefine the result before even spinning the wheel and "spin" the wheel so that it stops at the predefined result.. you'd just have to make sure that it actually stops at the right result.. so perhaps try attaching some invisible cubes to the wheel which contain some info and read that info via some ray or lineCast?
(even if that seems to be a bit overkill)
Ideally you'd know where each result on the wheel is w/o using additional components or ray/LineCasts. Like precalculate how much the wheel has to rotate to reach the next value and just make a list of possible results that corespond to the wheels rotation.. (like, if the rotation is 45, use result 1, if it's 45> .. <90 , use result 2.. etc)
Your answer
![](https://koobas.hobune.stream/wayback/20220613140623im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Rotate a sprite randomly between 2 points. 1 Answer
Mirroring sprite around arbitrary axis causes collision issues 0 Answers
Animator undoes sprite rotation 1 Answer
Rotate player 360 degrees once 0 Answers
How can I make the gun rotate and shoot like lost control and shooting all around ? 0 Answers