This is very bizarre how it is shaking so much even when smoothing it out. Any suggestions on the code below so it isn’t stuttering and shakey?
public void Flip()
{
foreach(Transform child in gameManager.playerCoreChildren)
{
StartCoroutine(Helper.LerpRotate(child.rotation,
Quaternion.Euler(new Vector3(0,0,0)),
1f ,
child));
}
}
public static IEnumerator LerpRotate(Quaternion start, Quaternion end, float lerpLength, Transform transF)
{
float t = 0;
while (t <= 1.0f) {
t += Time.deltaTime / lerpLength;
transF.rotation = Quaternion.Lerp (start, end, Mathf.SmoothStep (0.0f, 1.0f,Mathf.SmoothStep (0.0f, 1.0f, t)));
yield return null;
}
}