[Solved] Sprite not in the center while using Lerp

Hi All. I was using Center the camera on an object action, but for a smooth camera movement i changed it and instead used Lerp.


My problem is, as in the screenshot i uploaded, the player sprite is not in the center and is a little bit right side. I want it to be in the center. How can I do that?
and sorry for my bad English

Can I see the events


These are the events

The origin of the sprite (the X & Y point used when positioning the sprite) is on the top left. You want to lerp to Player.CentreX() instead.

1 Like

In addition to MrMen’s suggestion above, never leave the Camera Expressions (or conditions/actions) without the layer populated.

While it defaults to Base layer, if you ever add more layers you’re likely going to want to update it, and that’s going to require you to open it up and edit it from there since it’s currently blank. If you input “” in the layer field, it’ll also count as the base layer.

(You cannot control all cameras via one event action since each layer has a unique camera, which is why it is important to list which camera is being targeted by the event.)

Thanks @Silver-Streak and @MrMen for suggestions