Animation mixer not work on all objects

I’ve got a scene with multiple objects that have GLB timeline animations. When I preview the glb files in the online editor I see them working. Two of my animations play but one of them doesn’t, and it’s been a bit sparatic, when I first started it worked sometimes and sometimes not, it sometimes worked on my desktop but when I opened the file in my mobile device it didn’t… I did try adding animation-mixer=“clip: *;” to each entity but it didn’t work any different then when I originally have just animation-mixer on it’s own in each entity

@Bill_Sullivan are you receiving any console errors? Have you tried adding the 3D models one by one to see what could be affecting it?

Can you share the 3D models?

I was baffled as the model animated in the preview window so I started commenting out entities until it started working again. Then I saw that I had nested two objects together both with animations so I put them as siblings under one parent and they both work now. (funny thing is I was doing the same thing in another part of my file and all the animations worked?) The main thing is I figured it out. Thanks Ian for helping out.

1 Like

Hi Ian,

I’m seeing this happen again, where I have an a-entity with animation that has a child a-entity.

For some reason when I add the child the parent animation stops. When I remove the child a-entity the parent animation works again… is there a specific code that I need to add to parent / child entities for the animation to play? (before I solved this by nesting both inside another a-entity to work, but I’d like to not have to do that for every instance)

This is perplexing me as I’ve tried every combination of different asnimated glb files and at first DRACO was the issue, but it’s not.

It seems that certain parent child entities with animations won’t work together. But if you child them both to a blank entity the two children work.

Wish I had a way to debug this…

Can you share the code you are using?

Hi Ian,

I’ve done a ton of testing, and it’s still happening and I can’t seem to lock down why when parenting specific items together the parent loses the ability to play the animation…

Here is a simple example of it happening.

I have tow hot spots, both identical. The top one’s hot spot does not animate if I change the child entity to a different model. At first I though it might have to do with draco compression but it’s not…

If I put both items as sibblingings into a empty parent entity they both work, but as parent child the parent animation doesn’t play…

<a-entity 
  id="hotspot2" 
  gltf-model="#hotspot-target" 
  position="-1.15 6.7 -1.3" 
  rotation="0 90 0" 
  scale=".25 .25 .25"   
  animation-mixer
  class="cantap" 
  
  tap-hotspot >
  <a-entity 
    id="hotspot2-child"
    gltf-model="#HotSpotChest"
    position="18 0 0" 
    look-at="#camera"
    rotation="0 90 0" 
    scale="1 1 1" 
    visible="false"
    shadow="false"
    animation="property: scale; to: 5 5 5; dur: 800; easing: easeInOutQuad; clampWhenFinished: true ; autoplay: false; elasticity: 400"
    visible="false"
    animation-mixer
    tap-close
  ></a-entity>
</a-entity> <!-- end hot spot 3 -->

  <!--hat badges hot spot -->
<a-entity 
  id="hotspot3" 
  gltf-model="#hotspot-target" 
  position="-.8 10.8 -1.3" 
  rotation="0 90 0" 
  scale=".25 .25 .25"   
  animation-mixer=“clip: *;”
  class="cantap" 
  tap-hotspot >
  <a-entity 
    id="hotspot3-child"
    gltf-model="#coinO"
    position="8 0 0" 
    rotation="0 90 0" 
    scale="1 1 1" 
    visible="false"
    animation="property: scale; to: 5 5 5; dur: 800; easing: easeInOutQuad; clampWhenFinished: true ; autoplay: false; elasticity: 400"
    visible="false"
    animation-mixer
    tap-close
  ></a-entity>
</a-entity> <!-- end hot spot 3 -->