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.