Closed FangAk closed 9 months ago
const onMouseMove = (event: MouseEvent, intersected: any) => { let timer: number | null = null; if (object.value) { (object.value as any).material.color.setStyle("#fff"); if (timer) { clearInterval(timer); timer = null; } (object.value as any).rotation.y = 0; } if (intersected) { object.value = intersected.object; (object.value as `any).material.color.setStyle("red");` (object.value as any).name = "test"; } else { object.value = null; } };
intersected 为 null
请查看API文档关于intersectRecursive的描述,并将其设置为true,https://king2088.github.io/vue-3d-loader-docs/zh/guide/api.html#intersectrecursive
intersectRecursive
true
ok 以解决 感谢