How can I do a smooth tracking camera, using the animator controller?

Hello, I need a tracking camera, that follows the character (in 2d), when he is running right, put the player in the left, when stopps, put in the center, and if he is running to left, put the camera tracking more to the left.

I want to use a new script in the object camera, that uses de controller animator of th script in the character object, for checking in the update the variables in the animator, for example, if the “velocity” variable in animator is more than 0, tracking the character and put he in the left.

are there some tutorials for this? or how can I do it?

thanks

Sounds like you’ve solved your own issue - there’s nothing wrong with the approach you describe.

Designate a target for your camera to follow, then have it move “lazily” to keep the target centered. (In other words, move to keep the VIP centered, but limit the rate of motion). This should create the behavior you describe with a few lines of code.