Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Anim Component] Fix exit time conditions for non looping animations #5426

Merged
merged 5 commits into from Jun 22, 2023

Conversation

ellthompson
Copy link
Contributor

The anim controller shouldn't update the state time when a non looping animation has completed its playback. Additionally states that have finished their playback should have their exit time conditions checked as if they were playing.

Fixes #4427

I confirm I have read the contributing guidelines and signed the Contributor License Agreement.

@ellthompson ellthompson added bug area: animation Animation related issue labels Jun 21, 2023
@ellthompson ellthompson requested a review from a team June 21, 2023 15:34
@ellthompson ellthompson self-assigned this Jun 21, 2023
maxDuration = Math.max(maxDuration, activeClip.track.duration);
if (this._activeStateDurationDirty) {
if (this.activeStateName === ANIM_STATE_START || this.activeStateName === ANIM_STATE_END)
return 0.0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should probably update _activeStateDuration instead of just returning 0

@ellthompson ellthompson merged commit b65e0a3 into main Jun 22, 2023
7 checks passed
@ellthompson ellthompson deleted the non-looping-exit-time-fix branch June 22, 2023 10:22
slimbuck pushed a commit that referenced this pull request Jun 22, 2023
…5426)

* anim component - cap the active time of the non looping states to their duration and check for exit times when progress has stopped
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: animation Animation related issue bug
Projects
None yet
2 participants