Snippets

David Fraj Rotar un cubo en Unity

Created by David Fraj

File rotar.cs Added

  • Ignore whitespace
  • Hide word diff
+using UnityEngine;
+using System.Collections;
+
+public class Rotar : MonoBehaviour {
+
+    float x;
+	float y;
+	float z;	
+
+	// Use this for initialization
+	void Start () {
+		this.x = Random.Range (-3, 3);
+		this.y = Random.Range (-3, 3);
+		this.z = Random.Range (-3, 3);
+	}
+	
+	// Update is called once per frame
+	void Update () {
+		this.transform.Rotate (new Vector3 (this.x, this.y, this.z));
+	}
+}
HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.