Repository navigation
Conversation
When a shake was stopped and another one started in the same frame (the documented way to change the shake parameters), the object kept the angle/position/scale it had reached instead of going back to its original values: - "Stop shaking" only flagged the shake to be stopped at the end of the frame, and starting the new shake overwrote this flag, so the stop was never processed. - The displacement of the previous shake was only undone for the amplitudes of the current shake. Once the new shake replaced them (for example, an angle shake replaced by a scale shake), the angle reached by the previous shake was never undone and accumulated at each switch. Now "Stop shaking" undoes the displacement immediately, and the displacement is undone according to what was actually travelled rather than the current amplitudes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GFZnZxMkqmjNFcNf4uAZnZ
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.
Description
Switching between two shakes that keep going until stopped (for example, one per state) left the object at the angle, position or scale it had reached, and this offset built up at each switch. There were two causes:
Changes:
UndoShakeDisplacement.How to use it
Use "Stop shaking" then "Shake object" (with "Keep shaking until stopped") in each state, each with different parameters. Every new shake now starts from the object's original values.
Example project
None attached. I tested it with a gameplay test run in GDevelop 5.6.287, using two states that switch between an angle shake and a scale shake. It fails with the old version (the object stays tilted by 2.45° during the scale shake) and passes with this one. The gameplay tests of the 10 examples that use this extension also pass with it.
Checklist
AI usage
Generated by Claude Code