isterkvarn / operation_shell_shock

Game jam game
1 stars 0 forks source link

Improve camera #4

Open Loppansson opened 9 months ago

Loppansson commented 9 months ago

The current camera is unpredictable and gets in one's way. Rn the camera snaps between looking backwards and forwards, and moves up and down in an erratic manner, which is disorienting.

Some improvements that can be made are:

Loppansson commented 9 months ago

As of my latest commit, i've overhauled the previous camera. Now the camera changes it's position relative to the player smoothly and linearly, instead of snapping at arbitrary times.

Furthermore, the cameras y-position now gets updated using "CameraMarkers". When the player passes a CameraMarker, the camera moves to place it's self on the y-axis, so that the bottom of the screen touches the marker. If lerp is toggled on for a marker, the camera lerps between the current and next markers y positions based on the players x-position.

Feedback of the changes so-far would be appreciated:)