Skip to content

Commit f75a296

Browse files
Merge pull request #183 from Veerum/JL-fix-orthographic-raycast
Fix: PointCloud pick with an Orthographic camera does not use mouse position
2 parents 97ccd0f + 1a50db5 commit f75a296

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)