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

228
Visualizações
How to make a rotation in a object in two directions but one at a time in three.js?

I want to rotate the wheels of a car in two directions, up when the car is moving forward and when it's moving in the left/right direction. But, when I'm try to move the wheels after rotate left/right, the rotation still apllys in the up direction, creating a strange circular movement. I did using

// to rotate in the Y axis
if (keyboard.pressed("left")) {
  wheel.rotation.y -= 0.01
}

if (keyboard.pressed("up")) {
// to rotate in the X axis
  wheel.rotation.x -= 50
}

Image of the car

about 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

It may sound silly, but have you tried using the 'z' axis instead of the 'y'?

about 4 years ago · Santiago Trujillo Relatório
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