Skip to content

Instantly share code, notes, and snippets.

@yunojy
Created March 14, 2014 22:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yunojy/9558420 to your computer and use it in GitHub Desktop.
Save yunojy/9558420 to your computer and use it in GitHub Desktop.
using UnityEngine;
using System.Collections;
public class AroundAndAround : MonoBehaviour {
public float Speed = 1.0f, Radius = 20.0f;
void Update () {
transform.Rotate(0, Speed, 0);
transform.localPosition = transform.forward * Radius;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment