4.25.2014

The Subtle Magic of InterpTo()

By Jeff Farris

There’s a certain amount of craftsmanship involved in making things move around algorithmically.  Getting a camera to slide smoothly into position, gliding on the gossamer wings of math, can be a perilous underataking.  One wrong wobble, one tiny pop, and every pixel on the screen becomes wrong, the needle slides off the record, and the magic spell is broken.

Enter one of my favorite tools in the Unreal Engine toolbox: the InterpTo() functions, available in C++ or in Blueprints.

Programming screenshot

Blueprints Screenshot

They exhibit fast exit behavior, accelerating instantly.  They have a silky smooth arrival characteristic, and they terminate without a noticeable pop in a reasonable timeframe.

They’re great for smoothing out discontinuities.  They can deliver a sense of momentum and “weight”.

They’re perfect for interpolations with an indeterminate endpoint.  Try setting up a “pursuit” scenario – your actual value ever-interpolating toward the ideal goal value – and you’ll get a satisfying and highly tunable “flexiness”.

They’re framerate-independent. Enough, anyway.

They’re fun at parties.

In short, they’re a valuable tool in the Unreal Engine toolbox and worth getting to know. And as always, if you have any questions or inspiring interpolation-related anecdotes to share, drop by the forums!

Recent Posts

The Story Behind Moving with Your Feet in VR Mode

The 3dRudder VR motion controller can be used to navigate scenes in VR Mode...

Getting Started with Google Blocks and Unreal Engine

Jarlan Perez outlines his experience working with Google to build a new two...

Explore VR in Unreal Engine for Archviz with our Design Visualization Webinar

Have you ever dreamed of creating your own futuristic scene in VR? Whether ...