Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Fix the rotation of airplanes #129

Merged
merged 1 commit into from
May 19, 2022
Merged

Fix the rotation of airplanes #129

merged 1 commit into from
May 19, 2022

Conversation

jdno
Copy link
Owner

@jdno jdno commented May 19, 2022

When airplanes reached the end of their flight plan, some random nodes were added to the plan to keep the airplane moving. When that happened, however, the rotation of the airplane's sprite was not updated. This resulted in airplanes moving sideways for a step in their flight plan, before being rotated correctly during the next step.

To fix this, a new system has been introduced that checks the rotation of each airplane on every frame. This can be optimized in the future to occur only when the flight plan of an airplane is updated.

When airplanes reached the end of their flight plan, some random nodes
were added to the plan to keep the airplane moving. When that happened,
however, the rotation of the airplane's sprite was not updated. This
resulted in airplanes moving sideways for a step in their flight plan,
before being rotated correctly during the next step.

To fix this, a new system has been introduced that checks the rotation
of each airplane on every frame. This can be optimized in the future to
occur only when the flight plan of an airplane is updated.
@jdno jdno added C-bug Report a new bug R-fixed Add a fixed bug to the release notes L-rust Tag the Rust ecosystem labels May 19, 2022
@jdno jdno self-assigned this May 19, 2022
@codecov-commenter
Copy link

Codecov Report

Merging #129 (2de460f) into main (a32e0c8) will decrease coverage by 0.24%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main     #129      +/-   ##
==========================================
- Coverage   56.70%   56.45%   -0.25%     
==========================================
  Files          46       47       +1     
  Lines        1388     1394       +6     
==========================================
  Hits          787      787              
- Misses        601      607       +6     
Impacted Files Coverage Δ
game/src/scene/game.rs 0.00% <ø> (ø)
game/src/systems/follow_flight_plan.rs 73.33% <ø> (+4.58%) ⬆️
game/src/systems/rotate_airplane.rs 0.00% <0.00%> (ø)
game/src/systems/spawn_airplane.rs 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a32e0c8...2de460f. Read the comment docs.

@jdno jdno merged commit 9fab033 into main May 19, 2022
@jdno jdno deleted the fix-sprite-rotation branch May 19, 2022 09:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
C-bug Report a new bug L-rust Tag the Rust ecosystem R-fixed Add a fixed bug to the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants