# Unreal script smerp function

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

## 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 on other sites
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 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 :).

1. 1
Rutin
32
2. 2
3. 3
4. 4
5. 5

• 13
• 58
• 11
• 10
• 14
• ### Forum Statistics

• Total Topics
632967
• Total Posts
3009558
• ### Who's Online (See full list)

There are no registered users currently online

×