ExOK / Celeste64

A game made by the Celeste developers in a week(ish, closer to 2)
1.58k stars 125 forks source link

* Player: Fix slight control issue. #60

Closed iProgramMC closed 4 months ago

iProgramMC commented 4 months ago

Essentially, the player will take a detour towards the camera when moving left/right.

The fix is simple - keep a different "camera target position" and use that in the "forward" calculation, rather than World.Camera.Forward.

Ideally the camera itself would have a "destination" field, but this is fine for now.

NoelFB commented 4 months ago

This makes sense to me, but is there any reason this variable is stored in the World? It feels like it should be local to the Player

iProgramMC commented 4 months ago

Hmm. My thinking was that the camera was in World, and not in Player, so a camera-related variable would also belong in World

NoelFB commented 4 months ago

yeah but in this case it's not the actual camera, it's a variable controlled by the player and used entirely by the player to store the target direction that the player lerps the camera towards. So in this case, I believe it should be local to the player.

iProgramMC commented 4 months ago

Sure, I'll adjust it tomorrow, or you can commit to my branch and then pull, since I left "allow edits by maintainers" on.