-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
spatial_audio_2d and spatial_audio_3d examples: emitter jumps when movement is unpaused #15837
Copy link
Copy link
Closed
Labels
A-AudioSounds playback and modificationSounds playback and modificationC-ExamplesAn addition or correction to our examplesAn addition or correction to our examplesD-StraightforwardSimple bug fixes and API improvements, docs, test and examplesSimple bug fixes and API improvements, docs, test and examplesS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!This issue is ready for an implementation PR. Go for it!
Description
Bevy version
0.14, main
What you did
git checkout 754194fd24b7baaa24fcadca0b1378413e39421b
(example is broken for other reasons in more recent commits)cargo run --example spatial_audio_2d- Press
spaceto pause emitter movement - Wait one second
- Press
spaceagain to unpause
What went wrong
Emitter jumps in space rather than continuing from pre-pause position
Additional info
The arrow keys should still be able to move the listeners while the emitter movement is paused, so I'm not sure if we can just pause Time.
I would suggest a change starting from
#[derive(Component, Default)]
struct Emitter {
- stopped: bool,
+ stopwatch: Stopwatch,
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-AudioSounds playback and modificationSounds playback and modificationC-ExamplesAn addition or correction to our examplesAn addition or correction to our examplesD-StraightforwardSimple bug fixes and API improvements, docs, test and examplesSimple bug fixes and API improvements, docs, test and examplesS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!This issue is ready for an implementation PR. Go for it!