No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

SpinLoad.cs 431B

12345678910111213141516
  1. using UnityEngine;
  2. public class SpinLoad : MonoBehaviour
  3. {
  4. public bool active = false;
  5. Vector3 rand1, rand2;
  6. void Update()
  7. {
  8. if (!active)
  9. return;
  10. rand1 = new Vector3(Random.Range(-1, 1), Random.Range(-1, 1), Random.Range(-1, 1));
  11. rand2 = new Vector3(Random.Range(-1, 1), Random.Range(-1, 1), Random.Range(-1, 1));
  12. transform.Rotate(Vector3.Cross(rand1, rand2));
  13. }
  14. }