Created
February 10, 2014 23:43
-
-
Save andyzinsser/8926544 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 SpinningReel : MonoBehaviour { | |
private bool isSpinning = true; | |
public float smooth = 10f; | |
void Update () { | |
if (Input.GetKeyUp (KeyCode.S)) | |
{ | |
Debug.Log("S pressed"); | |
Quaternion newPosition = transform.rotation * Quaternion.Euler(45f, 0f, 0f); | |
transform.rotation = Quaternion.Slerp(transform.rotation, newPosition, Time.deltaTime * 100f); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
using UnityEngine;
using System.Collections;
public class SpinningReel : MonoBehaviour {
}