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?

  • \$\begingroup\$ What do you mean by lerping? \$\endgroup\$ Sep 5 '19 at 20:34
  • \$\begingroup\$ @DJSpicyDeluxe I believe they're refering to "Linear intERPolation". As in, having a curve instead of a square. \$\endgroup\$
    – Logarr
    Sep 5 '19 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
    Sep 5 '19 at 21:38

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


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.