THREE.MeshLine icon indicating copy to clipboard operation
THREE.MeshLine copied to clipboard

Annoying shake when camera moves

Open mertselimb opened this issue 5 years ago • 2 comments

Hi, i am using this as my camera and renderer.


        this.camera = new THREE.PerspectiveCamera(
            90,
            width / height,
            0.1,
            1000
        );

        this.renderer = new THREE.WebGLRenderer({
            alpha: true,
            antialias: true
        });

When i draw this line

            let geometry = new THREE.Geometry();
            this.coordinates.forEach((c) => (geometry.vertices.push(new THREE.Vector3(c.x, c.y + 0.015, c.z))));
            let line = new MeshLine();
            line.setGeometry(geometry);
            let material = new MeshLineMaterial({
                color:"#3a5d91",
                lineWidth: 0.015
            });
            const mesh = new THREE.Mesh(line.geometry, material); 
            this.directionObjects.add(mesh);

When i move camera in any direction line shakes a lot and nothing else shakes. Sometimes it becomes see through for some parts too like a glitch effect. I am suspecting low width causes this.

How can i solve it?

mertselimb avatar Feb 18 '20 07:02 mertselimb

I am facing the same issue Could you please respond ?@spite

mahmodHammad avatar Sep 30 '20 13:09 mahmodHammad

If you could provide a working example illustrating the issue, on codepen or such, it would be a great help.

spite avatar Sep 30 '20 13:09 spite