Skip to content

Conversation

@vikgor
Copy link
Contributor

@vikgor vikgor commented May 1, 2023

For finish checkpoints, as for all checkpoints, the height of the collider component was always set to (screenSize - leftBottomCorner), meaning finish checkpoints were always "stretched" to the top.

That limited the options for level design, because putting a finish checkpoint in the bottom of the level would mean that the same X position on other levels higher than the actual finish checkpoint would count as such (meaning you couldn't walk just above the checkpoint).

To fix that I added a isFinish parameter which would set CheckpointComponent.adjustsColliderSize to false to keep the original height of the collider.
Also updated RestartAtCheckpointScene to showcase the setting.

Before After
before after

@cocoatoucher
Copy link
Owner

Hello, thanks for the contribution and the detailed explanation and sorry for the delay on my side.
I'm thinking maybe instead of naming this variable isFinished, it can be named something like stretchesToTop to make it ready for more general use. What do you think?

@vikgor
Copy link
Contributor Author

vikgor commented Jul 11, 2023

Sure, makes sense
Let me update the changes
Thanks for the reply!

Copy link
Owner

@cocoatoucher cocoatoucher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thank you very much 🙌

@vikgor
Copy link
Contributor Author

vikgor commented Jul 14, 2023

I can't merge this PR, if it's ok you can do it any time
Thank you! The engine is great, I'm working on a simple game, hoping to release it next month, will make sure to let you know.

@cocoatoucher cocoatoucher merged commit 4724f8d into cocoatoucher:master Jul 15, 2023
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.

3 participants