2
\$\begingroup\$

I set sprite animation at key1 and key2.

at Key1 :

Position.x = 0

at Key2 :

Position.x = 1

I want it not lerping. i mean i want it appear at posX 0 and posX 1. not between 0~1.

what should i do?

\$\endgroup\$
3
  • \$\begingroup\$ What do you mean by lerping? \$\endgroup\$ Commented Sep 5, 2019 at 20:34
  • \$\begingroup\$ @DJSpicyDeluxe I believe they're refering to "Linear intERPolation". As in, having a curve instead of a square. \$\endgroup\$
    – Logarr
    Commented Sep 5, 2019 at 21:23
  • 1
    \$\begingroup\$ @DJSpicyDeluxe I mean i want it move in discrete way, not continuous way. and Mailerdaimon's answer solved it. \$\endgroup\$
    – Hree
    Commented Sep 5, 2019 at 21:38

1 Answer 1

4
\$\begingroup\$

You have to rightclick on the animation curve and set both tangents to broken and constant. enter image description here

enter image description here

See the documentation here: https://docs.unity3d.com/Manual/EditingCurves.html

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .