Musicboxes: Difference between revisions
Appearance
mNo edit summary |
mNo edit summary |
||
| Line 6: | Line 6: | ||
calculate n-times rotation / min. of various diameters | calculate n-times rotation / min. of various diameters | ||
public class SpinningBox : MonoBehaviour { | |||
public float yawDegreesPerSecond = 10.0f; | |||
// Update is called once per frame | |||
void Update () { | |||
Vector3 localEulers = transform.localEulerAngles; | |||
localEulers.y += yawDegreesPerSecond * Time.deltaTime; | |||
transform.localEulerAngles = localEulers; | |||
} | |||
Revision as of 03:08, 26 August 2014
rotating cylinders a la astrolabes
spherical astrolabe
calculate n-times rotation / min. of various diameters
public class SpinningBox : MonoBehaviour {
public float yawDegreesPerSecond = 10.0f;
// Update is called once per frame
void Update () {
Vector3 localEulers = transform.localEulerAngles;
localEulers.y += yawDegreesPerSecond * Time.deltaTime;
transform.localEulerAngles = localEulers;
}