Demigiant / dotween

A Unity C# animation engine. HOTween v2
http://dotween.demigiant.com
Other
2.3k stars 346 forks source link

LocalAxisAdd is broken #605

Closed ttesla closed 1 year ago

ttesla commented 1 year ago

I guess this fix breaks LocalAxisAdd mode. It wobbles at 180. You can try it. Put a Cube in the scene, attach this script and press Q, you will notice the bug at 180 degree. It somehow jumps to -180 and wobbles.

public class TestTweenCode : MonoBehaviour
{
    private Vector3 mRotVal = new Vector3(60.0f, 0.0f, 0.0f);

    void Update()
    {
        if (Input.GetKeyDown(KeyCode.Q)) 
        {
            transform.DOLocalRotate(mRotVal, 0.1f, RotateMode.LocalAxisAdd).SetEase(Ease.OutQuad);
        }
    }
}
Demigiant commented 1 year ago

Used the other thread to answer (with a fix).