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

238
Visualizações
ammo.js after calling applyTorque how to update the force direction?

I am using ammo.js to create a simple demo.

I have a 3d object in the world and I can make it move with the following code:

cubeObject.applyForce(new Vec3(10, 0, 0));

It will move along the x-axis and then stop gradually.

Now I want to make it to turn a little bit (imagine a car turning):

cubeObject.applyTorque(new Vec3(0, 1000, 0));

After calling this code, the cube (car) dose turn a certain degree (this is good as expected).

But the problem is, the car is still moving along the x-axis instead of moving towards the direction it is facing (after turning).

I do not know what I am missing here.

Any advice will be appreciated, thank :)

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