Put move_skybox into CoreStage::PostUpdate #9
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.
I first used this plugin in combination with the bevy_flycam plugin, but when i wrote a simple test program, occasionally the skybox would rapidly jitter whenever the camera moved.
skybox.mp4
I fixed this by creating a stage label(This PR now putsSkyboxStage
, which is a single system stage that runs afterCoreStage::Update
and only contains themove_skybox
system.move_skybox
into CoreStage::PostUpdate instead of its own stage.) My rationale is that any method that moves the camera will most likely be within the Update stage, and this change will improve bevy_skybox as a drop-in plugin without any camera system needing to be aware of its ordering.I initially tried to fix this by going into bevy_flycam and adding
.before("skybox")
to the systems that moved the camera, but this output the error "system wants to run before unknown label 'skybox'" and did not fix the issue. Thus, I believe that this is the correct fix to this problem.