Skip to content

Commit 2d96042

Browse files
committed
fix: correct picking raycasting failing when not in front
1 parent 71cd92a commit 2d96042

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/core/src/core/Clipper/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,11 +321,11 @@ export class Clipper
321321
// }
322322
// }
323323

324-
private async pickPlane(world: World): Promise<SimplePlane | undefined> {
324+
private pickPlane(world: World): SimplePlane | undefined {
325325
const casters = this.components.get(Raycasters);
326326
const caster = casters.get(world);
327327
const items = this.getAllPlaneMeshes();
328-
const intersects = await caster.castRay({ items });
328+
const intersects = caster.castRayToObjects(items);
329329
if (intersects) {
330330
const found = intersects.object as THREE.Mesh;
331331
return [...this.list.values()].find((p) => p.meshes.includes(found));

0 commit comments

Comments
 (0)