Jump to content
  • Advertisement
Sign in to follow this  
Guthur

Unreal script smerp function

This topic is 3473 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Can anyone point me to some examples of usage regarding this function, or a decent description. I am wanting to produce a parabolic trajectory with unreal script and I'm wondering if this function can give me a decent approximation of said trajectory between two points. I don't have access to the Unreal Engine at the moment so writing this script, and or testing that function is proving troublesome. From what limited info I could find I think it will produce results similar to Cosine graph.

Share this post


Link to post
Share on other sites
Advertisement
smerp() is a non-linear interpolation between A and B using alpha as the interpolation factor. With a linear interpolation between A and B, if you plotted the interpolated point against the interpolation factor, it would be a straight line. With smerp() plotting from 0 to 1, the interpolated point would move slowly at first then speed up until it hit the center and then slow down as it reaches 1. The equation looks something like:

smerp(alpha, A, B) = (3 * alpha^2 - 2 * alpha^3) * (B - A) + A

Share this post


Link to post
Share on other sites
Cheers SiCrane

Thats a great explanation, I think I can see how I can work with that.

On a side note UnrealScript seems quite nice, I have never really looked into it before but I quite like the whole state block thing :).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!