Search Unity

Animated UI as a slot machine landing on random results?

Discussion in 'Scripting' started by Jeepster, Apr 23, 2019.

  1. Jeepster

    Jeepster

    Joined:
    Jan 23, 2014
    Posts:
    401
    Hi,

    I've got 10 images that I wish to see scrolled through randomly, starting with a burst of speed and ending slowly on 1 of the ten images. It should be a random result each time. Does anybody know how to do that?

    This is an alternative to using a 3D wheel-like object with the images on it and having it rotate. Because since it would have to be a child object to a parent with mouselook script on it, the rotation gets messed up, wether I use AddTorque transform.up or AddTorque Vector3.Up.
     
  2. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,195
    Seems like a lot of tutorials for making a slop machine out there. For example:


     
  3. palex-nx

    palex-nx

    Joined:
    Jul 23, 2018
    Posts:
    1,748
    Try using AddRelativeTorque instead