Hi everyone!
I’m working on something like pool game.
Now, when I set raycast from camera to plane on y=0
from point A to B, I’ve created tinny cubes coping both vectors from intersects[0].point
. They are on Y=0
But when I log those same vectors I get with y > 0
This is my function
function floorRay(e, source) {
e.preventDefault()if(source) { raycast.setFromCamera(pointerState.position, camera) } else { raycast.setFromCamera(pointerState.clickPos, camera) } raycastData.intersects = raycast.intersectObject(floorMesh, false) }
Why this is happening?