mirror of
https://github.com/troisjs/trois.git
synced 2024-11-23 20:02:32 +08:00
fix intersectRecursive
This commit is contained in:
parent
f3ffea6248
commit
8dd9d24f24
@ -181,7 +181,7 @@ export default function usePointer(options: PointerConfigInterface): PointerInte
|
||||
function pointerClick(event: TouchEvent | MouseEvent) {
|
||||
updatePosition(event)
|
||||
if (intersectObjects.length) {
|
||||
const intersects = raycaster.intersect(positionN, intersectObjects)
|
||||
const intersects = raycaster.intersect(positionN, intersectObjects, intersectRecursive)
|
||||
const iMeshes: InstancedMesh[] = []
|
||||
intersects.forEach(intersect => {
|
||||
const { object } = intersect
|
||||
|
@ -4,7 +4,7 @@ import { IntersectObject } from './usePointer'
|
||||
export interface RaycasterInterface {
|
||||
position: Vector3
|
||||
updatePosition(coords: Vector2): void
|
||||
intersect(coords: Vector2, objects: IntersectObject[], recursive: boolean): Intersection[],
|
||||
intersect(coords: Vector2, objects: IntersectObject[], recursive?: boolean): Intersection[],
|
||||
}
|
||||
|
||||
export interface RaycasterConfigInterface {
|
||||
|
Loading…
Reference in New Issue
Block a user