Profile image

[HELP me again] lerpangle not right

487 griges  9 days ago

pls spoon-feed me how to use lerpangle
i tried

lerpangle(0,180,(Heading-targetheading))

`
but not work, i thought similar to inverselerp can output between 0-1 accordingly 0-180
but its just counting when the heading-target is 1, so the other 179° output still 1

  • Log in to leave a comment
  • Profile image
    487 griges

    btw your explanation is better than the one from github 👍

    8 days ago
  • Profile image
    487 griges

    @hpgbproductions thank you very much!
    i haven't try now
    but, is it right i can use lerpangle to go with the closest angle?
    tried to change the heading to 360 bcs i cannot figured

    8 days ago
  • Profile image

    lerpangle is used like lerp, not inverselerp
    .
    lerpangle(a, b, t):
    When t = 0, output is a
    When t = 1, output is b
    This is the angle version, so it will always output a value between -180 and 180
    basically the same

    +1 8 days ago