Created
September 30, 2017 07:30
-
-
Save nrfm/df95fbe38fbcaa26c738b8baa53d68c0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class Rotator : MonoBehaviour { | |
// Before rendering each frame.. | |
void Update () | |
{ | |
// Rotate the game object that this script is attached to by 15 in the X axis, | |
// 30 in the Y axis and 45 in the Z axis, multiplied by deltaTime in order to make it per second | |
// rather than per frame. | |
transform.Rotate (new Vector3 (15, 30, 45) * Time.deltaTime); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment