So technically this is a musical app, so I would like to express the variable as BPM. But it is a radar spinning around a circle, therefore it is an RPM speed also.
Here’s the script I use to spin my radar line within the circle:
using UnityEngine;
using System.Collections;
public class Spin : MonoBehaviour {
public float speed = 10f;
// Update is called once per frame
void Update () {
transform.Rotate (Vector3.forward, speed * Time.deltaTime);
// {
//}
}
}
Questions:
- What is this speed? I’m guessing the ‘f’ is for frames. But how is this expressed? i,e, MPH, KPH
- How could I script a conversion to the RPM/BPM? (Assuming 4 beats/revelation, something like this.)