Answers for "unity deltatime"

C#
2

unity deltatime

using UnityEngine;
// Rotate around the z axis at a constant speed
public class ConstantRotation : MonoBehaviour
{
    public float degreesPerSecond = 2.0f;
    void Update()
    {
        transform.Rotate(0, 0, degreesPerSecond * Time.deltaTime);
    }
}
Posted by: Guest on May-30-2021

C# Answers by Framework

Browse Popular Code Answers by Language