Skip to content

How do you pause the physics simulation? #21

Answered by idanarye
Pyroglyph asked this question in Q&A
Discussion options

You must be logged in to vote

For the pause menu, you can use TnuaSystemSet. Bevy allows you to put conditions on existing system sets, so you can just put your own condition on it. This is how it is done in the demos:

app.configure_set(TnuaSystemSet.run_if(|tnua_active: Res<ExampleUiTnuaActive>| tnua_active.0));

Keep in mind that you also need to pause Rapier while in the pause menu.

As for removing controls from the player - I'm afraid it is not currently supported. I do want to implement things like dashes as part of Tnua (#6). For now, you don't have to remove the entire bundle - removing the TnuaMotor should be enough.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@Pyroglyph
Comment options

@idanarye
Comment options

Answer selected by Pyroglyph
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants