-
Notifications
You must be signed in to change notification settings - Fork 304
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
[animation-mixer] Animation cannot be set and unpaused in the same change #354
Comments
hmm... can you share a simplified bare minimum example, and we can try to test out your different ideas? I am also open to a voice call and a screen share to work on this. I think you can dm me (is that possible on github? not sure. If not you can also join this discord http://thexrweb.com and present the same issue there and we can continue trying to work on it from there.) we could try. |
I've set up an example that demonstrates what I mean. https://codesandbox.io/s/adoring-chatelet-f3cgl the following keys are used From playing around with it, it seems the situation is a little different than I originally thought. It seems like individual animations are remembering the last timescale assigned to them. Here are some examples I noticed misbehaving, with the key presses required. Example 1:
Example 2
Both issues also occur if you use 0.5 and 1 for the timeScales, instead of 0 and 1. (key presses [4, x, 1, c, 2, 3] and [1, x, shift + 1, x, 2, shift + 1]) However they work as expected if you use 0 and 0.5 (key presses [4, z, 1, x, 2, 3] and [1, z, ctrl + 1, z, 2, ctrl + 1]). Once you have broken the animation, you cannot restore it by setting timescale = 1 via [c] or [shift + 1-4]. You have to set timescale = 0 or 0.5 first, and then you can set it back to 1. |
I have an animation that I need to start paused on the first frame with
animation-mixer="timescale: 0;"
After some events, I want to set the animation clip to play and unpause it, by calling
el.setAttribute("animation-mixer", {clip: "some_clip", timeScale: 1})
, however there is adata.timeScale !== 1
check in the playAction function that ignores the change to timeScale.I'm not sure if it would be better to change that check to
data.timeScale !== action.effectiveTimeScale
, remove it entirely, or change the update function to apply timescale changes there.For now, I'm working around the issue by setting the clip in the starting settings as
animation-mixer="clip: some_clip; timescale: 0;
, but that only works because I know what clip I want to play.The text was updated successfully, but these errors were encountered: