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

Returning to main menu in debug mode turns off rapier debug draw plugin #132

Closed
odecay opened this issue Jul 25, 2022 · 1 comment · Fixed by #224
Closed

Returning to main menu in debug mode turns off rapier debug draw plugin #132

odecay opened this issue Jul 25, 2022 · 1 comment · Fixed by #224
Assignees
Labels
kind:bug Something isn't working scope:small A small and well-defined task
Milestone

Comments

@odecay
Copy link
Collaborator

odecay commented Jul 25, 2022

Description

When returning to the main menu either by pausing or allowing both player characters to die, on restarting the game/level through the menu, the rapier debug drawing features are no longer loaded.

This makes it necessary to close and re run the program when doing certain types of debugging/development as opposed to continuing session through use of menu.

Expected Behavior

Expect rapier debug features to remain loaded after restarting through menu.

@odecay odecay added kind:bug Something isn't working scope:undetermined Undetermined size, needs investigation labels Jul 25, 2022
@odecay odecay closed this as completed Jul 26, 2022
@odecay odecay reopened this Jul 26, 2022
@odecay
Copy link
Collaborator Author

odecay commented Jul 26, 2022

Mistakenly closed, reopened.

@zicklag zicklag self-assigned this Jul 27, 2022
@zicklag zicklag added scope:tiny A task that takes less than an hour and removed scope:undetermined Undetermined size, needs investigation labels Jul 27, 2022
@zicklag zicklag added this to the v0.0.4 milestone Jul 27, 2022
@zicklag zicklag added scope:small A small and well-defined task and removed scope:tiny A task that takes less than an hour labels Aug 12, 2022
bors bot added a commit that referenced this issue Aug 12, 2022
224: Fix rapier debug render r=zicklag a=zicklag

Fixes #132.

Found out that #132 was caused by the fact that the debug lines plugin that rapier uses to manage debug rendering requires that 4 entities be kept alive to contain the debug lines.

The issue is when we try to reset the world by deleting all entities other than the camera, those entities get deleted, too. And we can't filter those entities out because their distinguishing component is private. Also, there isn't a way to re-create those entities after adding the plugin.

This works around the issue by implementing a custom debug lines renderer for Rapier that uses Egui to draw the lines instead.

It's simple and mostly copied from rapier's plugin.

Co-authored-by: Zicklag <zicklag@katharostech.com>
bors bot added a commit that referenced this issue Aug 12, 2022
224: Fix rapier debug render r=zicklag a=zicklag

Fixes #132.

Found out that #132 was caused by the fact that the debug lines plugin that rapier uses to manage debug rendering requires that 4 entities be kept alive to contain the debug lines.

The issue is when we try to reset the world by deleting all entities other than the camera, those entities get deleted, too. And we can't filter those entities out because their distinguishing component is private. Also, there isn't a way to re-create those entities after adding the plugin.

This works around the issue by implementing a custom debug lines renderer for Rapier that uses Egui to draw the lines instead.

It's simple and mostly copied from rapier's plugin.

Co-authored-by: Zicklag <zicklag@katharostech.com>
@bors bors bot closed this as completed in 152ff63 Aug 12, 2022
DRuppFv pushed a commit to DRuppFv/punchy that referenced this issue Aug 14, 2022
Implements custom debug renderer for Rapier using Egui.

This is to avoid an issue we have using Rapier's built-in debug renderer,
which requires entities to be kept alive that we can't filter based on
components.

Fixes fishfolk#132
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug Something isn't working scope:small A small and well-defined task
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants