Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于节点拾取的疑问 #7

Open
vellengs opened this issue Dec 14, 2019 · 0 comments
Open

关于节点拾取的疑问 #7

vellengs opened this issue Dec 14, 2019 · 0 comments

Comments

@vellengs
Copy link

threshold 固定值无法精准适配 scale 节点大小的问题。

   let ray = new THREE.Raycaster()
    ray.setFromCamera(normalMouse, this.camera)
    ray.params.Points.threshold = 2 // 对于不同的scale 这个固定的值会导致无法像碰撞检测那样精准的拾取,有无更好的方案?
    let intersects = ray.intersectObjects(this.scene.children).filter(e => e.object.type === 
   'Points' && !e.object.name.startsWith('hl'))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant