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

implements variable and double jumps and pane control settings #138

Merged
merged 3 commits into from
May 20, 2024

Conversation

TheCodeTherapy
Copy link
Contributor

This PR implements:

  • Double jump;
  • Variable height jump (depending on how long the user holds space);
  • Character Controller settings exposed on the TweakPane for fine-tuning;

What kind of change does your PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Refactor
  • Tests
  • Other, please describe:

Does your PR fulfill the following requirements?

  • The title references the corresponding issue # (if relevant)
2024-05-20.19-29-01.mp4

Object.values(this.animations).forEach((action) => {
action.stop();
});
this.preventDoubleJump = true;
Copy link
Contributor

Choose a reason for hiding this comment

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

It took me a while to figure out what this was doing. If I understand correctly it's stopping the handling of a change back to AnimationState.doubleJump after the animation has played so that even though the controller is declaring the animation state is AnimationState.doubleJump the air animation isn't overridden. This was confusing to say the least 😅

@TheCodeTherapy TheCodeTherapy merged commit f169fed into main May 20, 2024
5 checks passed
@deej-io deej-io deleted the feature/control-settings branch August 5, 2024 13:49
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