using UnityEngine;
using System.Collections;

public class Revolving : MonoBehaviour 
{
	[SerializeField]
	private float angle = 0;
	[SerializeField]
	private float w = 1;

	private Vector3 ComputePosition()
	{
		return new Vector3(Mathf.Cos(angle), 0, Mathf.Sin(angle));
	}

	// Use this for initialization
	void Start () 
	{
		Debug.Log("Start!");
	}
	
	// Update is called once per frame
	void Update () 
	{
		angle += w * Time.deltaTime;
		gameObject.transform.position = ComputePosition();
	}
}
