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

127
Visualizações
Move orbitcontrol camera on circular path around object

newbie in threejs here.

I have a cube with different color on each face. The cube can be rotate using OrbitControl and I have 6 buttons in Dat.GUI to control the camera position. Objective is when clicking on "Animate to red", the orbitcontrol camera will move to the red face from its current position on a circular path, "Animate to blue" camera will move to the blue face and so on...

I have the "Animate to red" button somewhat working right now but I don't think my solution is right. Can someone point me to the right direction? Thanks

Here is my codesandbox link https://syckkt.csb.app/

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

0

So I've implemented a fix to your code here: https://exciting-haslett-vfbojd.csb.app/

The idea is to have a list of unit vectors representing each side, then animating the camera to that position. If the side is on the opposite side of the shape we animate to a perpendicular side first and then towards our target side after. Just check the code it's all in there.

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