Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class BaseRotationScript : MonoBehaviour {
- public float RotSpeed = 1f;
- void Update ()
- {
- if(Input.GetKey(KeyCode.A))
- {
- transform.Rotate(0, -RotSpeed, 0);
- }
- else if(Input.GetKey(KeyCode.D))
- {
- transform.Rotate(0, RotSpeed, 0);
- }
- }
- }
Advertisement
RAW Paste Data
Copied
Advertisement