Last active
February 27, 2017 11:50
-
-
Save WakkyFree/3de4f2f8bb596a111699d357bfb42c67 to your computer and use it in GitHub Desktop.
Script for Unity
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 SwingBat : MonoBehaviour { | |
float r = 30; // Rotation Speed | |
// Use this for initialization | |
void Start () { | |
} | |
// Update is called once per frame | |
void Update () { | |
if (Input.GetMouseButton(0)) // Pressed left click | |
transform.Rotate(0, -r, 0); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment