MB_ExampleMover.cs 243 B

12345678910111213
  1. using UnityEngine;
  2. using System.Collections;
  3. public class MB_ExampleMover : MonoBehaviour {
  4. public int axis = 0;
  5. void Update () {
  6. Vector3 v1 = new Vector3(5f,5f,5f);
  7. v1[axis] *= Mathf.Sin(Time.time);
  8. transform.position = v1;
  9. }
  10. }