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

109
Vistas
Change camera position to specific coordinate

enter image description here

Hello everyone,

In this diagram I tried to explain the flow I would like to create by pressing the two keys (Forward & Backward).Basically the camera should position itself in the fixed points perhaps following a soft trajectory.

// button Forward

var elementB = document.querySelector(".Forward");
 elementB.onclick = function(MoveUp){
    gsap.to(camera.position,  {
        duration: 2, 
        x: -1.9, 
        y: 0.9, 
        z: -2,
        onUpdate: function() {
        controls.update()
        }
    } 
)}

// button Start Position

var elementB = document.querySelector("Home");
elementB.onclick = function(MoveUp){
   gsap.to(camera.position,  {
       duration: 4, 
       x: 13, 
       y: 20, 
       z: -20,
       onUpdate: function() {
       controls.update()
       }
   } 
)}

in this moment I have reached the first position but to continue forward I have to create other buttons with coordinates, but that is not what I would like.

about 4 years ago · Juan Pablo Isaza
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