Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

107
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!