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

252
Visualizações
How to rotate and position the center object?

enter image description here enter image description here

I created a toolbox that can rotate and reposition a mesh with an axis in the middle. When I separate rotation and position, then the position will return to the previous one. However this causes rotation not on the mesh. So what I do is use multiply. But this is not what I expected because the mesh position should be where I marked it (not in mesh axis). How to rotate and position the object so that it remains in the specified position and rotate at that location ? Here is my code :

const translation = new THREE.Matrix4().makeTranslation(
  this.valueAOA_X,
  this.valueAOA_Y,
  this.valueAOA_Z
);
const angleRadian = CoordinateConverter.degreeToRadian(
  this.valueAOA_Rotation
);
const rotationAOA = new THREE.Matrix4().makeRotationZ(angleRadian);   
this.selectedModel.setPlacementTransform(
  rotationAOA.multiply(translation)
);
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Fixed it by this line:

  this.selectedModel.setPlacementTransform(
    translation.multiply(rotationAOA)
  );
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