Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

160
Visualizações
Animating the multi user object

I'm new to A-Frame js and am now stuck in one problem. Problem is that I'm using a networked A-Frame library for a multi-user experience. And have on the character which I'm showing there having some animation. So, by using some Jquery code I tried to add some animation controls. When I'm using that animation in the character which is shown on my own screen is animating, But in real scenarios, if I'm moving then that person should see me animating. Because I'm moving the camera or doing activities, not that avatar.

<a-assets>
     <a-asset-item id="person" src="./person/scene.gltf"></a-asset-item>
</a-assets>

This is the person model which I'm using.

<!-- ++++++++++++++++++++++++++ Person Template ++++++++++++++++ -->
      <template id="person_template">
        <a-entity
          id="model"
          gltf-model="#person"
          animation-mixer="clip: Rig|man_idle;"
          scale="0.02 0.02 0.02"
        >
        </a-entity>
      </template>

This is the template that I'm using in the networked entity.

<a-entity
        id="rig"
        position="-9.495 0.770 6.282"
        position="-5 0.2 1"
        rotation="0 180 0"
        movement-controls="speed:0.15; constrainToNavMesh: true;"
      >
        <a-entity camera="active:true" position="0 2 0" look-controls>
         
          <a-entity
            id="player"
            networked="template:#person_template;attachTemplateToLocal:false;"
            movement-controls="speed:0.15; constrainToNavMesh: true;"
            look-controls
            wasd-controls="acceleration:15"
          >
          </a-entity>
        </a-entity>
    </a-entity>

This is the networked entity i used to make multi-user env.

  $(document).ready(function () {
          $(this).keydown(function (e) {
            switch (e.which) {
              case 37:
                $("#model").attr("animation-mixer", "clip: Rig|man_walk_in_place;");
                $("#model").attr("rotation", "0 -90 0");
                break;
             }

This is the code I write to add animation which, is visible by another person in the controlling avatar.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda