Open julio-cavallari opened 10 months ago
Probably fixable by extending Marqueepicker._buildMarqueeFrustum
to set the picking frustum's far plane distance to the same distance as the Camera
's active projection:
https://github.com/xeokit/xeokit-sdk/blob/master/src/extras/MarqueePicker/MarqueePicker.js#L306
eg.
math.frustumMat4(
left,
right,
bottom * ratio,
top * ratio,
near,
far: this.scene.camera.projection.far,
this._marqueeFrustumProjMat,
);
Where the far plane is provided by these projection components:
https://github.com/xeokit/xeokit-sdk/blob/master/src/extras/MarqueePicker/MarqueePicker.js#L306 https://github.com/xeokit/xeokit-sdk/blob/master/src/extras/MarqueePicker/MarqueePicker.js#L306
I noticed that the problem is related to the canvas size, when the canvas is the full size of the screen, the selection works perfectly
Describe the bug Using our own model, selection by marquee picker does not work correctly, with the camera far away nothing is ever selected, and with the camera close to an object, the selected objects are not those within the selection area
To Reproduce Steps to reproduce the behavior:
Expected behavior Select objects correctly based on selection area
Screenshots Video with the problem
Desktop (please complete the following information):
Additional context Add any other context about the problem here.