Я хочу плавно вращать куб по оси Z без каких-либо задержек, но это не работает.
Вот мой код:
using UnityEngine;
using System.Collections;
using System;
public class clockAnimator : MonoBehaviour {
// Use this for initialization
void Start () {
}
private const float
secondsToDegrees = 0.1f;
public Transform seconds;
// Update is called once per frame
void Update () {
DateTime Time = DateTime.Now;
//seconds.localRotation = Quaternion.Euler(0f, 0f,(Time.Millisecond*-secondsToDegrees)*0.03f);
seconds.localRotation = Quaternion.Euler(0,0,Time.Millisecond*-secondsToDegrees);
}
}
Подробнее здесь: https://stackoverflow.com/questions/298 ... y-in-unity