aframe-extras icon indicating copy to clipboard operation
aframe-extras copied to clipboard

Playing an animation in reverse?

Open nsbingham opened this issue 5 years ago • 2 comments

I'm attempting to play an animation defined in a GLB in reverse using animation-mixer.

I use this code to trigger the animation, which works as expected.

obj.setAttribute('animation-mixer', {
     clip: "Grow",
     loop: "once",
     clampWhenFinished: "true"
});

Later, I attempt to play the animation in reverse on the same object with the following code:

obj.setAttribute('animation-mixer', {
     clip: "Grow",
     loop: "once",
     clampWhenFinished: "false",
      timeScale: "-1"
});

My expectation is that the animation would play in reverse, but nothing appears to happen. If I log obj.getAttribute('animation-mixer'), I see the updated values.

nsbingham avatar Sep 11 '19 21:09 nsbingham

I would be interested in this as well, is this supported or somehow doable?

netgfx avatar Oct 15 '20 09:10 netgfx

@nsbingham I have achieved this by doing: clip: Walk; timeScale: -1; clampWhenFinished:true; repetitions:1;

netgfx avatar Oct 15 '20 10:10 netgfx

It seems the same issue as #364. I'm closing this issue as duplicate.

vincentfretin avatar Dec 07 '22 12:12 vincentfretin