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

364
Visualizações
How to rotate an object around a distant pivot based on pivot rotation?

I've read the answer to the Three JS Pivot point question and it works okay. But what I'm trying to accomplish involves also the object to rotate based on the pivot rotation.

Let's say for instance that I have an object red that acts as a pivot for the little object blue. As soon as the red object moves or rotates, the blue object will move and rotate accordingly but keeping the distance between red and blue.

For simplicity in the following image we're only in the situation in which the red object rotates only.

The signature of the function answered in the other question is the following:

function rotateAboutPoint(obj, point, axis, theta, pointIsWorld)

I don't understand how do I get the axis and theta values starting from the red object rotation.

Or if that function doesn't fit this case, I'm open for other solutions.

I know that if I add the blue object as a child of the red one everything will fall in place, but I need the two objects (red and blue) to be independent from each other.

To complicate things more I'm not rotating the red object directly, but I'm using ammo.js to apply force and torque on it as a dynamic body, but I guess that I can still know its rotation by using red.rotation

red pivot rotation

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