Lerping Fundamentals - Learn How to Use It & When to Use Its Variants | Unity Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ส.ค. 2024

ความคิดเห็น • 44

  • @protox4
    @protox4 2 ปีที่แล้ว +14

    Another common use for lerp is a smooth follow script, where the object moves towards its target and automatically slows down as it gets closer. This is done in an update timer constantly every frame, plugging its own position in for a, with a fixed t (which can be increased or decreased to adjust the speed).

  • @Giucalistro
    @Giucalistro 4 หลายเดือนก่อน +1

    exactly what I was looking for, thank you for the clear explanation!

  • @thepolygonpilgrimage
    @thepolygonpilgrimage 2 ปีที่แล้ว +3

    Nicely done sir! Really enjoyed this. Some great, clear examples!

  • @djpersonalspace2406
    @djpersonalspace2406 ปีที่แล้ว +2

    Brilliant tutorial. Thanks so much for this!

  • @GameDevBits
    @GameDevBits 2 ปีที่แล้ว +2

    This is really great. Well explained!

  • @Oleg_UE5
    @Oleg_UE5 2 ปีที่แล้ว +2

    great tutorial, that really helps my dream become a reality :)

    • @LlamAcademy
      @LlamAcademy  2 ปีที่แล้ว

      That's what I'm here for 😁

  • @a.technology1446
    @a.technology1446 2 ปีที่แล้ว +1

    This is amazing, thank you

    • @LlamAcademy
      @LlamAcademy  2 ปีที่แล้ว

      You're very welcome! 🤗

  • @Jam-ht2ky
    @Jam-ht2ky 3 หลายเดือนก่อน

    thank you

  • @worldscolide6895
    @worldscolide6895 ปีที่แล้ว

    what an amazing guy

  • @lukaspaver
    @lukaspaver ปีที่แล้ว

    Thanks so much!

  • @alperaydin7011
    @alperaydin7011 2 ปีที่แล้ว +1

    Thanks

  • @othmane8587
    @othmane8587 2 ปีที่แล้ว

    Thanks , amazing tuto ,
    Can you please make a tuto for :smooth swipe movement (left _right ) like runner games of casual games ?
    Thank you again ❤

    • @LlamAcademy
      @LlamAcademy  2 ปีที่แล้ว

      I'll add it to the list of topics to cover!

  • @Zify.z
    @Zify.z 4 หลายเดือนก่อน

    How do you lerp the cube between the two circle continuously for lerp with time?

    • @LlamAcademy
      @LlamAcademy  4 หลายเดือนก่อน

      you can have a MonoBehaviour that lerps from one to the other and track which one it should be going to

  • @RDD87z
    @RDD87z 2 หลายเดือนก่อน

    any idea how could i rotate an object with an overshoot? something like a elastic (springeffect)?

    • @LlamAcademy
      @LlamAcademy  2 หลายเดือนก่อน

      I have a video on springs here: th-cam.com/video/6mR7NSsi91Y/w-d-xo.html

    • @RDD87z
      @RDD87z 2 หลายเดือนก่อน

      @@LlamAcademy nice. thank you

  • @watercat1248
    @watercat1248 4 หลายเดือนก่อน

    Do you have have toutoria about this shooting system 5:39
    It's very important for my to understand how to make shooting system for my game.

    • @LlamAcademy
      @LlamAcademy  4 หลายเดือนก่อน +1

      Yup, here it is Bouncing Bullets with Hitscan Guns | Unity Tutorial
      th-cam.com/video/GkStW8-Q5P0/w-d-xo.html

    • @watercat1248
      @watercat1248 4 หลายเดือนก่อน

      @@LlamAcademy thenks

  • @taqaz
    @taqaz 8 หลายเดือนก่อน

    how can i use it for fixed speed vector3.lerp???

  • @LTMidnight
    @LTMidnight 2 ปีที่แล้ว

    How would you go about making an object go from one point to another, but speed up as it gets closer to its destination?

    • @LlamAcademy
      @LlamAcademy  2 ปีที่แล้ว +1

      I would do this with an AnimationCurve. In the future more advanced lerping tutorial I'm planning I'll cover that in more depth. But essentially you can define a
      [SerializeField]
      private AnimationCurve LerpCurve;
      and instead of passing time directly into the lerp, you can use LerpCurve.Evaluate(time);

  • @macleodgordon
    @macleodgordon 2 ปีที่แล้ว

    I know how to Lerp, but I need to know how do I Lerp from A to B, then from B to C? Where do I put this code and do I need a coroutine to do this?

    • @LlamAcademy
      @LlamAcademy  2 ปีที่แล้ว

      If you want a 3 point lerp from A-> B -> C the easiest way to handle that is a coroutine (or update loop) just lerping exactly like you said, wait until you hit point b, then update to go to point C using B as the starting point for the second starting point and resetting your timer variable!

  • @newsystem3667
    @newsystem3667 ปีที่แล้ว

    One thing I would have liked to see is lerping a scale

    • @LlamAcademy
      @LlamAcademy  ปีที่แล้ว

      Scale works the same as position, since it is a Vector3. You can use the exact same code, but assigning to transform.localScale property instead of transform.position property

  • @unique_ideas091
    @unique_ideas091 ปีที่แล้ว

    The file in GitHub is all pink as I import it in unity

    • @LlamAcademy
      @LlamAcademy  ปีที่แล้ว

      🤔 are you using HDRP or URP? This repository was using Built-In Render Pipeline. That's just a guess

  • @EricBalcon
    @EricBalcon ปีที่แล้ว

    good tutorial but without complete scripts it's difficult for new learners like me.

    • @LlamAcademy
      @LlamAcademy  ปีที่แล้ว

      Full project is on GitHub. Link in description

  • @user-nn3dc3jg9y
    @user-nn3dc3jg9y 7 หลายเดือนก่อน

    Lerp, Slurp and Leripng, all sound like rick and morty made-up words

    • @LlamAcademy
      @LlamAcademy  7 หลายเดือนก่อน +1

      lerp slerp....😁

  • @digitalpanda5969
    @digitalpanda5969 ปีที่แล้ว +1

    me yes me

  • @maxst9561
    @maxst9561 ปีที่แล้ว +1

    you can fricking lerp colors? 😅😅😅😅