Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Camera Panning Fix #20

Merged
merged 1 commit into from
Jun 28, 2022
Merged

Camera Panning Fix #20

merged 1 commit into from
Jun 28, 2022

Conversation

Byteron
Copy link
Contributor

@Byteron Byteron commented Jun 28, 2022

Currently, when panning, the camera doesn't move from the camera, however the parallax background layers are moving, the further back the faster.

This PR fixes / improves the camera panning.
The Panning is now handled with a separate component storing the offset from the player. this way you can pan the camera independently from the player position. If you move the player, the camera keeps its offset.

Also, the parallax backgrounds moves correctly with the camera panning.

unknown_2022 06 28-15 15

@Byteron Byteron marked this pull request as ready for review June 28, 2022 13:08
@Byteron
Copy link
Contributor Author

Byteron commented Jun 28, 2022

also for comparison, this is how it is in master
unknown_2022 06 28-16 22
you see, up and down sort of works, but left and right is not accurate. the camera stays on the player, but the background moves weirdly.

@odecay odecay merged commit f9c164d into fishfolk:master Jun 28, 2022
@Byteron Byteron deleted the camera_fix branch June 28, 2022 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants