The lerp camera works fine but for some reason whenever the screen starts camera starts from the middle of the screen moving towards the player until centered.
Is there any way i can just immediately center the camera on player?
This is my camera events so far :
There is also an issure where if i kept the game idle for a while the camera would “jitter” a little bit where it moves around and then recenters on the player.
I’ve tried adding the “non lerp” commands first to see if it’ll work (basically trying to center the camera instantly and then changing it to lerp) but it didn’t.
That’s how LERP works, It eases the transition between two values over time.
At the beginning of the scene, your camera is at 0,0 your player is somewhere else so the camera moves from 0,0 to your player.
a great fix would be to center the camera on your player at the beginning of the scene
Working preview -
It did definitely ease down my problem but it still exists. Probably has something to do with these lines in my events :
Is there any way i can add these on the original lerp command? That might fix the problem.
why do you have these actions?
To adjust the camera pretty much. Puts the player a tad bit lower left on the screen instead of the center. Tried to go with the “Super Mario” look with the camera.
I’m very sure that’d conflict with the lerp, you can try adding it to the players or y position in the lerp, rather than having another action to do that
Yeah that seems to be the problem.
The thing is that adding it before the lerp command seems to not work and i don’t really know how to add it to the lerp command.
Could use a bit of a hand there
I haven’t tried this before but you can do
Lerp(cameraX, player.X() + 20, 0.05)
you can replace the 20 with a number of your choice.
Doesn’t work sadly. It probably exists but not sure what it is.
A bit of an update :
Found it, it was lerp(CameraX() +11.35, player.X(), 0.05) and so on but it just does the same thing as the other command. Still having issues with it.