improve trace/line selection precision on zoom
This commit is contained in:
parent
52b74f3daf
commit
6b85e44b67
2 changed files with 9 additions and 4 deletions
|
|
@ -1368,6 +1368,11 @@ gapp.register("moto.space", [], (root, exports) => {
|
|||
updateLastAction();
|
||||
updateFocus();
|
||||
}, (val) => {
|
||||
if (camera && viewControl) {
|
||||
// increase intersect line precision on zoom
|
||||
const dist = camera.position.distanceTo(viewControl.target);
|
||||
raycaster.params.Line.threshold = Math.min(1, dist / 100);
|
||||
}
|
||||
updateLastAction();
|
||||
if (slider) slider(val);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue