I’ve made showroom prototype. When user clicks to particular point of the floor camera moves to the the given point. I’ve moving camera using gsap 3 where it uses requestAnimationFrame api. But I got some lags and delays when camera moves in 3d space. I can’t fix this issue. Can anybody help?
Here’s my codepen
gsap.to(camera.position, 2, {x: intersect.point.x, z: intersect.point.z, ease:Power1.easeIn,
onUpdate: () => {
camera.updateProjectionMatrix();
}} );
however, i’ve update camera projection matrix on every camera position update