Hi, I was trying to make the object from a model face the camera which is clicked. I’m changing the position of the camera taking the point where it is clicked but it’s showing in an angle not exactly facing the camera. I want to show the object exactly face the camera straight. Here is my code:
gsap.fromTo(
camera.position,
{ x: camera.position.x, y: camera.position.y, z: camera.position.z },
{
duration: 1,
x: e.point.x ,
y: e.point.y+10 ,
z: e.point.z,
ease: "power2.inOut",
}
);