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

242
Visualizações
Three JS match object rotation with joystick

I’m trying to implement an onscreen joystick to control a 3D avatar’s movement.

  1. The joystick is from Nipplejs https://github.com/yoannmoinet/nipplejs
  2. The perspective camera is fixed in place and continuously lookAt at the moving avatar
  3. After the character moves a certain distance, the camera will jump to a position behind the character
  4. I’m using joystick’s radian position for the avatar’s Y rotation

However when I push the joystick 90 degrees, the 3D avatar doesn’t move forward, instead it rotates and moves to the right.

And when the avatar rotates towards a different direction, pushing the joystick 90 degrees results in the avatar again changing to a different direction.

I’ve included a drawing showing the fixed joystick and the above situation.

How can I have the avatar’s direction always match the joystick’s rotation / direction?

Thank You!

enter image description here

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