Add example to output a debugdump#576
Merged
ThierryBerger merged 6 commits intodimforge:masterfrom Sep 13, 2024
Merged
Conversation
ThierryBerger
commented
Sep 6, 2024
bevy_rapier2d/examples/debugdump2.rs
Outdated
Comment on lines
26
to
37
| pub fn display_events( | ||
| mut collision_events: EventReader<CollisionEvent>, | ||
| mut contact_force_events: EventReader<ContactForceEvent>, | ||
| ) { | ||
| for collision_event in collision_events.read() { | ||
| println!("Received collision event: {collision_event:?}"); | ||
| } | ||
|
|
||
| for contact_force_event in contact_force_events.read() { | ||
| println!("Received contact force event: {contact_force_event:?}"); | ||
| } | ||
| } |
Contributor
Author
There was a problem hiding this comment.
User systems are not strictly neeed and maybe should be removed ?
Member
There was a problem hiding this comment.
Yeah, let’s just stick to the rapier systems here.
3324ff4 to
b669fe2
Compare
Merged
sebcrozet
approved these changes
Sep 13, 2024
bevy_rapier2d/examples/debugdump2.rs
Outdated
Comment on lines
26
to
37
| pub fn display_events( | ||
| mut collision_events: EventReader<CollisionEvent>, | ||
| mut contact_force_events: EventReader<ContactForceEvent>, | ||
| ) { | ||
| for collision_event in collision_events.read() { | ||
| println!("Received collision event: {collision_event:?}"); | ||
| } | ||
|
|
||
| for contact_force_event in contact_force_events.read() { | ||
| println!("Received contact force event: {contact_force_event:?}"); | ||
| } | ||
| } |
Member
There was a problem hiding this comment.
Yeah, let’s just stick to the rapier systems here.
Jondolf
added a commit
to avianphysics/avian
that referenced
this pull request
Sep 20, 2024
# Objective - I appreciate graphs from [`bevy_mod_debugdump`](https://github.com/jakobhellermann/bevy_mod_debugdump), this PR merely starts a discussion on adding some "first party" interest to such graphs. - it can be useful to compare with bevy_rapier: dimforge/bevy_rapier#576 ## Solution - Add an example to generate those Run with: `cargo run --example debugdump_3d > avian.dot && dot -Tsvg avian.dot > avian.svg` ## Output for 3d <details><summary>PhysicsSchedule</summary> <p>  </p> </details> <details><summary>SubstepSchedule</summary> <p>  </p> </details> <details><summary>FixedPostUpdate</summary> <p>  </p> </details> <details><summary>Update</summary> <p>  </p> </details> --- ## Changelog - Add an example to generate systems ordering graphs. --------- Co-authored-by: Joona Aalto <jondolf.dev@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This kind of example can be useful to both maintainers and users, to help understanding current state of the plugin, how things interact together.
Also there are some system ambiguities which are difficult to reason about in code, this visualization can help with that: