Custom Animation Curve 사용법

DOTween에서 제공하는 기본 easing 옵션 대신, **AnimationCurve**를 사용하여 직접 커브를 정의할 수 있다.

 

이를 통해 특정 시점에서 느려지는 정도를 조절할 수 있다!

 

 

// AnimationCurve를 정의
AnimationCurve customCurve = new AnimationCurve(
    new Keyframe(0, 0),       // 시작점
    new Keyframe(0.5f, 0.8f), // 중간점
    new Keyframe(1, 1)        // 끝점
);

// DOTween에서 커브를 적용
subPos.DOAnchorPosX(subPos.anchoredPosition.x - 1500, 0.25f)
    .SetEase(customCurve);

 

 

키프레임을 추가하여 특정 시점에서의 속도 변화를 세밀하게 제어할 수 있다

 

 

 

반응형

+ Recent posts