Showcases
How to
Notifications
JB
breaknet91
Mod the Cube example
Example for you to make your Cube to move in circle: public MeshRenderer Renderer; float timeCounter = 0f; float speed = 5.0f; float height = 5f; float width = 5f; void Start() { transform.position = new Vector3(3, 4, 1); transform.localScale = Vector3.one * 1.3f; Material material = Renderer.material; //Static Color material.color = new Color(0.5f, 1.0f, 0.3f, 0.4f); } void Update() { timeCounter += Time.deltaTime * speed; float x = Mathf.Cos(timeCounter) * width; float y = Mathf.Sin(timeCounter) * height; float z = 1f; transform.position = new Vector3(x,y,z); } }
69 views
7 plays
0 likes
1 comments
Dash
133 views
1 plays
0 likes
0 comments