I'm trying to make that the object will start rotating slowly smooth increasing he rotation speed to some max speed then when reaching them ax speed to start slowly smooth decrease the speed back down until stop.
I'm trying to use SmoothStep but maybe I should use some how SmoothDamp ?
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class Testings : MonoBehaviour
{
public Transform text;
float minimum = 10.0f;
float maximum = 20.0f;
float duration = 5.0f;
float startTime;
void Start()
{
startTime = Time.time;
}
void Update()
{
float t = (Time.time - startTime) / duration;
text.rotation = new Quaternion(0, Mathf.SmoothStep(minimum, maximum, t), 0, 0);
}
}