I want to know how Camera works in game of Celeste.
Currently what I have is, camera follows the player using interpolation:
cameraPosition = cameraPosition + (playerPosition - cameraPosition) * 0.1;
and I clamp the camera position to the edge of the world size:
cameraPosition = mu.clamp(cameraPosition - [160, 90], 0, worldSize);
I subtract [160, 90]
to center the camera.
This works OK. But is that all there is to it.
Specifically, how does the camera work between room transitions.
I might drop room transitions, and just do a black screen transition between levels, but I’ve heard there is camera triggers that offset the camera relative to player position, and what other tricks are used?