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

235
Visualizações
three.js get right hand vector

This gives me the forward vector of a Object3d

var forward = new THREE.Vector3();
object.getWorldDirection(forward); 

How do I get the right-hand side vector of the object (using Three.JS)?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

My best advice is to NOT include 'three.js' in your Google search when looking help regarding three.js.

I excluded 'three.js' from my searches and found similar questions by people in a Unity community...

Knowing this I found a very simple (admittedly very hacky) solution which works in three.js.

Take a plain-old right-hand vector

var right = new THREE.Vector3( 1, 0,  0 );

And just "turn it" by the object's .quaternion value...

right.applyQuaternion( object.quaternion );

Any (normalized) direction relative to the object's rotation can be gleamed in this fashion

Example: http://jsfiddle.net/9Lzx683v/

Picture of a Cube, with six smaller cubes orbiting around it's XYZ axis directions

about 4 years ago · Juan Pablo Isaza 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