Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- THIS IS THE SCRIPT IM TRYING TO REFERENCE
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class RotateSpeedDial : MonoBehaviour
- {
- static float minAngle = 70.64f;
- static float maxAngle = -269.69f;
- static RotateSpeedDial thisSpeedo;
- void Start () {
- thisSpeedo = this;
- }
- public static void ShowSpeed(float speed, float min, float max) {
- float ang = Mathf.Lerp(minAngle, maxAngle, Mathf.InverseLerp(min, max, speed));
- thisSpeedo.transform.eulerAngles = new Vector3(0,0,ang);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement