0
<a-mixin id="spin"
    animation__xyr="property:rotation;from:0 0;to:-180 90;dur:900;dir:normal;loop:1;easing:linear;startEvents:br;"
    animation="property:position.x;from:0;to:5;dur:900;dir:normal;loop:1;easing:linear;startEvents:br;"
    animation__xyr="property:rotation;from:-180 90;to:-360 0;dur:900;dir:normal;loop:1;easing:linear;startEvents:br;"
    animation="property:position.x;from:5;to:10;dur:900;dir:normal;loop:1;easing:linear;startEvents:br;"
</a-mixin>

The first two steps work perfectly but the entity disappears after animation="property:position.x;from:0;to:5... and doesn't carry out the last two animations. How do I get it to carry out all 4 steps, it has to be triggered by one click.

I expected the entity (a plane) to complete a whole barrel roll but it stops half way through the spin. I tried writing the rotation as one animation but I don't know how to make it rotate 90 degrees in one way and the back the other on the Y-axis in the same animation.

Is there any different way I can get my plant to carry out this movement?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • Looks like [this](https://stackoverflow.com/questions/66089939/making-two-animations-at-once-in-a-frame) or [this](https://stackoverflow.com/questions/68135178/a-frame-multiple-animations-with-camera) – Piotr Adam Milewski Mar 20 '23 at 07:30

1 Answers1

-1

{ "animation": { "frametime": 1, "keyframes": [ 0, { "rotation": [0, 0, 0], "time": 0 }, { "rotation": [0, 360, 0], "time": 10 }, { "rotation": [0, 720, 0], "time": 20 } ] } }

Ishanssi
  • 69
  • 1
  • 3