Skip to content

Fix start of animations being inconsistent by tweaking AnimationTrackProperty.cs.#6610

Open
mika10095 wants to merge 3 commits into
space-wizards:masterfrom
mika10095:animation-fix
Open

Fix start of animations being inconsistent by tweaking AnimationTrackProperty.cs.#6610
mika10095 wants to merge 3 commits into
space-wizards:masterfrom
mika10095:animation-fix

Conversation

@mika10095

Copy link
Copy Markdown

After trying and failing to properly fix it within C# or YAML or the animation keys themselves this 2 line engine PR is the solution.
Basically the first key of the animation is just inconsistent. It might get updated instantly in which case it looks like the fixed version or it might take a split second which causes the animation to do a harsh jump. This way the start of the animation will be on the first key which shouldnt break anything.

before

2026-06-02.13-06-52.mp4

after

2026-06-02.13-13-41.mp4

@ProPeperos

Copy link
Copy Markdown

wrong repo

@mika10095

mika10095 commented Jun 2, 2026

Copy link
Copy Markdown
Author

@ProPeperos > wrong repo

Can you please explain why? I used footage from Project Carmine as thats where the problem can be easily reproduced.
Basically everywhere AnimationTrackProperty.KeyFrame() is used its used with a 0f length start key.
Like in LightFadeSystem.cs for example

new AnimationTrackProperty.KeyFrame(Angle.Zero, 0),
new AnimationTrackProperty.KeyFrame(Angle.FromDegrees(120), third),
new AnimationTrackProperty.KeyFrame(Angle.FromDegrees(240), third),
new AnimationTrackProperty.KeyFrame(Angle.FromDegrees(360), third)

or ChasmFallingVisualsSytem.cs

new AnimationTrackProperty.KeyFrame(component.OriginalScale, 0.0f),
new AnimationTrackProperty.KeyFrame(component.AnimationScale, length.Seconds),

Seemingly this should be the intended behaviour rather than the current one.
All this does is instantly snap it to that 0.0 second keyframe rather than needing it to update twice.

@ProPeperos

Copy link
Copy Markdown

i guess i just got confused by the footage and and different PR formatting, sorry

@mika10095 mika10095 changed the title Fix start of animations being inconsistent. Fix start of animations being inconsistent by tweaking AnimationTrackProperty.cs. Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants