Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

258
Vistas
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 Respuestas
Responde la pregunta

0

Fixed it by this line:

  this.selectedModel.setPlacementTransform(
    translation.multiply(rotationAOA)
  );
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda