using UnityEngine; using System.Collections; using System; public class Pendeldus : MonoBehaviour { public double nurk = 0.1; public double nurkkiirus = 0.01; public float raadius = 4; public GameObject juht; void Start () { } // Update is called once per frame void Update () { nurk = nurk + nurkkiirus; transform.position = new Vector3( (float)(raadius * Math.Cos(nurk))+juht.transform.position.x, (float)(raadius * Math.Sin(nurk))+ juht.transform.position.y, juht.transform.position.z); } //Koostage päike ja paar planeeti }