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

Support fixating the horizontal distance of jumps #20

Open
idanarye opened this issue May 30, 2023 · 0 comments
Open

Support fixating the horizontal distance of jumps #20

idanarye opened this issue May 30, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@idanarye
Copy link
Owner

Tnua lets you set a jump height and calculates the initial vertical velocity from there. This allows games to fixate the height a character can jump, which is important for level design, and then work on the other parameters to make the jump feel good.

But the height of the jump is not the only important parameter for level design. Level design also cares about the horizontal distance - how long a gap can the character cover when jumping? It would be beneficial for Tnua to fixate that number as well, and calculate various parameters (like gravity?) from it.

The horizontal distance is the multiplication of the horizontal velocity by the duration of the jump. The horizontal velocity is already fixated with TnuaPlatformerConfig::full_speed, but can be varied by game actions (like dashing), so it will probably be better to control for the jump duration instead.

@idanarye idanarye added the enhancement New feature or request label May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant