Camera follow player + limit + lerp is possible?

I am trying to get the camera to follow the player with a lerp but in turn I want that if it reaches the beginning of the screen or the end of the screen, it has a limit
It is possible to make the camera have this behavior

What I usually do is I create an object that I constantly center the camera on. Then I use forces to make it go to the player object and use object collisions to make limits. Instead of forces I guess you can use tweens or timedelta+lerp.

Hi, Are you still wondering?
Yes it’s possible, like arthuro said, there will be a serparate Object that will follow the player object, and use some events to move it. I just let “Center camera within limits” handle the limits part though.

This image is the function code, that moves the “tracking object”:

Note that it is a Function, not a normal event.

This one, where the camera centers itself on “tracking object”…

After making the tracking object invisible, the tracking object moves according to above code, then the camera is centered within limits using variables.

1 Like

Awesome!!! Thanks, thats is what I needed.

Before convert the code to a function
I’m trying to set up this but the tracker at the start of the scene goes to the left and dissapears, the camera follows the tracker but the tracker doesn’t follow the obj_player_platform