Skip to content

Add direction to ScreenShake2D #2429

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

Closed
bunny-therapist opened this issue Oct 20, 2024 · 0 comments · Fixed by #2448
Closed

Add direction to ScreenShake2D #2429

bunny-therapist opened this issue Oct 20, 2024 · 0 comments · Fixed by #2448
Assignees
Milestone

Comments

@bunny-therapist
Copy link

Enhancement request:

What should be added/changed?

An argument, e.g., direction_deg,to arcade.camera.grips.ScreenShake2D which sets a constant angle for the shaking instead of changing it (_current_dir) randomly. If the argument is not provided(e.g., it is None), then the behavior is the same as now.

What would it help with?

Sometimes, one wants to have a directed shake. One common usecase that often appears in commercial platformers is a vertical screenshake when a heavy enemy lands on the ground. This would be a backwards compatible change that would make ScreenShake2D more versatile.

Currently, I am subclassing ScreenShake2D to implement this myself for directed shakes, but using regular ScreenShake2D for non-directed shakes.

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 a pull request may close this issue.

3 participants