Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public float speed = 1f;
- public float radius = 5f;
- void Update() {
- float angle = Time.time * speed;
- float x = Mathf.Cos(angle) * radius;
- float z = Mathf.Sin(angle) * radius;
- transform.position = new Vector3(x, 1, z);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement