Announcement

Collapse
No announcement yet.

Issue while lerping a float representing an angle

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Oh wow, thanks to both of you. I was just using the normal float lerp, ignoring Rotators had a lerp function attached. I tried looking for one by unchecking context sensitive while creating a node, thinking I would have searched into everything like that.

    I will test and let you know.

    EDIT: It works, problem solved.
    Thanks again, a bunch.
    Last edited by funkbro; 08-20-2014, 07:52 PM.

    Leave a comment:


  • replied
    You could try storing your angle in a Rotator and lerp that. The rotator lerp has the functionality to properly handle angle wrapping.

    Leave a comment:


  • replied
    I think lerp nodes have a "use shortest path" checkbox. Try turning those on if you haven't.

    Leave a comment:


  • started a topic Issue while lerping a float representing an angle

    Issue while lerping a float representing an angle

    I need to lerp a float that determines the angle of a character's bone. However, since angles go from -180 to 180, at some point the value is going to invert, and it will result in the character doing a reverse spin to reach the new point.



    In this gif, I wait for the alpha value of the lerping to reach 1, then I start rotating to show it works in that case.
    However, if I later show what happens if reach the point where the angle inverts while still lerping, and it will do the reverse spin I'm talking about.
    I'm pretty much looking for a blueprint new lerp function that won't allow that to happen, as any attempt to make one myself didn't quite get me where I wanted.

Working...
X