FIX camera micro stuttering

Hey there…

In my game i’m using a metroidavania similar camera.

Basically i created a placeholder object that act as camera focus…

when the player enter a room this object is binded to the player position.

when the player start to move (eg. to right) this object move first at + 100 px position…and stay at this distance (binded to player) to get a farest view of the room

these events


works fine…
and i tested and works with tweens too.

The problem is that the lerp (and tweens) create camera microstuttering…due to micro delayed distance calculation when the +100 position is reached, i guess bcs the check each frame the horizontal speed of the player…

this is based on the room camera ext…the cameractrl objec has the camera by room behavior

I need something that lerp then stop the placeholder object (binded to player pos) at certain position while the player still move.

Edit: wheen the player stop; the placeholder object return back to player position…last events.

mmm…it looks like more complex than i thought…-
I don’t think it is doable…
until i find something that don’t need the relation between the two objects…

Maybe add a third object to allow a bit of a buffer? Idk…