Skip to content

Instantly share code, notes, and snippets.

@nrfm
Created September 30, 2017 07:30
Show Gist options
  • Save nrfm/df95fbe38fbcaa26c738b8baa53d68c0 to your computer and use it in GitHub Desktop.
Save nrfm/df95fbe38fbcaa26c738b8baa53d68c0 to your computer and use it in GitHub Desktop.
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