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

98
Visualizações
Get absolute Camera Position and Rotation

I've set up a very simple script system where I can change the position and rotation of the camera in space through string commands in the browser like this

setCameraPosition(0,0,0); setCameraRotation(1,0,1); 

When I recreate the current camera position into a command and then reexecute this command the camera position is as expected. Even when I change the camera position with Mouse or Touchscreen and execute the command. When I reload the webpage and execute the command again the camera position/rotation is then different from what I saw earlier.

I am sure it is some kind of misunderstanding on my part.

I'll recreate the current camera position like this:

const pos = camera.position
const rot = camera.rotation
const args: string[] = []
args.push(`setCameraPosition(${pos.x}, ${pos.y}, ${pos.z})`)
args.push(`setCameraRotation(${rot.x}, ${rot.y}, ${rot.z})`)
return args.join('; ') + ';'
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