Hellow everyone ,I had some question with my procedure about threejs with Raycaster I add a plane to scene and I want to draw a point by clicking on the plane,but the DOM don't fill the screen
Here is my selection handler, used in vue.js:
const canvas = this.$refs.dreamview.getBoundingClientRect();
const pointer = new THREE.Vector2();
pointer.x =((event.clientX - canvas.left) /canvas.width) *2 1;
pointer.y =-((event.clientY - canvas.top) /canvas.height) *2 +1;
this.raycaster.setFromCamera(pointer, this.camera);
const intersects = this.raycaster.intersectObjects(scene.children, false);
let plane = intersects.find((e) => e.object.name === "plane");
I get the set of coordinates using the code above,but the plane.point is incorrect,i don't understand what went wrong;
Thank you all for any advice that you could give on this.