Jump to content

Soft blend in VEX For Loop direction


Badb3nd3r

Recommended Posts

Hello, I am building a growth script and create points that go in a certain direction each frame all inside a VEX for loop. I got a random vector which affects the direction at each iteration. Now my Points going way to zick zack. I can scale the random vector down but I want to try to get the direction from the previous step and soft blend them into the new direction. 

I tried to make a lerp between previousdirection and new direction calculated 

pos += lerp(dir,dirprev,chf("lerpamount"));
 

this works, somehow. But there are maybe better solutions for doing this I am not aware of. Can I get your opinion on that?

thank you

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...