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

164
Visualizações
How do i synchronize dynamic-body element networked a-frame and a-frame-physics

I am currently creating a online vr world with multiplayer, so i used networked a-frame to create the multiplayer world and i am using aframe-physics-system to create physics. But when i add a synchronized object with dynamic-body this doesnt get synchronized by the server so only the creator of the object can move it around.

<a-assets>
    <template id="sphere">
        <a-entity class="sphere">
            <a-sphere color="blue"></a-sphere>
        </a-entity>
    </template>
</a-assets>

<a-entity dynamic-body position="0 3 -10" id="sphere" Networked="template:#sphere;attachTemplateToLocal:True"></a-entity>

<!--Collide event-->
<script>
AFRAME.registerComponent('foo', {
    init: function() {
      this.el.addEventListener('collide', function(e) {
        console.log('Player has collided with ', e.detail.body.el);
        e.detail.target.el; // Original entity (playerEl).
        e.detail.body.el; // Other entity, which playerEl touched.
        e.detail.contact; // Stats about the collision (CANNON.ContactEquation).
        e.detail.contact.ni; // Normal (direction) of the collision (CANNON.Vec3).
      });
    }
})
</script>
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