2D Top Down Camera Smoothing

Hello,

I have a camera that’s a child of an object that I want it to follow (naturally), but when it comes to creating a smooth effect I am completely perplexed. Since the Camera is already following the object automatically how can I create a smooth effect without interfering with the transform component of the parent object? I’ve looked many threads and all the camera smoothing solutions seem to require a camera that’s not coupled with the target. Does anyone have a solution for this?

Thank you.

Hi

The simple fact is the correct solution is to not bind the camera rigidly to the object. This might initially seem the obvious approach - you want the camera to move with the object right?! But as you have discovered, as soon as you want subtly different behavior you’re stuck.

Fortunately, it’s not too difficult to make a camera that follows an object - you’ll need to create a script for the camera that looks at its target object and works out where it wants to be each frame, then sets its transform accordingly.

Once you have that, the simplest way to achieve smoothing is to lerp towards your target position/orientation each frame. More advanced approaches exist that involve acceleration/deceleration, but lerps will be a good start.

Simple answer though - you need to decouple camera and object. Then all the camera smoothing examples on the internet will be helpful :slight_smile:

-Chris