How to make side scroller camera like Playdead's Inside?

Played the game a couple of times. The camera work is quite elegant indeed.

Not sure if it’s a spline, somehow I doubt it. Hooking it up to a spline would be quite rigid unless you wanted to deform the spline and calculate the tangents - probably too fussy. I might be wrong, though.


I’d approach it by creating a standalone actor with a camera on a springarm - its length being the distance, and relative rotation the angle. The camera actor would need to track-interpolate several elements simultaneously:

  • player velocity vector
  • looking direction
  • a point of interest (most likely a camera-exclusive collision volume)
  • that one thing that I did not think about when creating it so now I need to rewrite half of the code…

Every Tick you’d construct a final resting position vector for the camera and interpolate location and rotation to match it. This will require quite a bit of tweaking to get the result you need. I’d probably make the interpolation rate dynamic as well so you have the ability to make the camera smoothing tighter when the action gets tense. For something as fine-tuned as this, I’d forgo the built-in camera lag completely and relay on custom functionality.

I believe this could be a start. Does this help at all?