Skip to content

Commit 1a50db5

Browse files
committed
fix: correctly calculate pick pixelPosition using ray origin
1 parent ed57c1e commit 1a50db5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/point-cloud-octree-picker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export class PointCloudOctreePicker {
9494
if (params.pixelPosition) {
9595
pixelPosition.copy(params.pixelPosition);
9696
} else {
97-
pixelPosition.addVectors(camera.position, ray.direction).project(camera);
97+
pixelPosition.addVectors(ray.origin, ray.direction).project(camera);
9898
pixelPosition.x = (pixelPosition.x + 1) * width * 0.5;
9999
pixelPosition.y = (pixelPosition.y + 1) * height * 0.5;
100100
}

0 commit comments

Comments
 (0)