You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Line2 object's position itself is not adjusted; instead, it is implemented through the geometry.setPositions method. This causes discrepancies when using TransformControls to move it or applying OutlinePass for outlining, where the selected position does not align with the actual line.
Expected Outcome: Fix the issue, or provide the correct way to handle Line2 so that TransformControls defaults to selecting the bounding box center of the line segment.
Thanks.
Reproduction steps
1.create a Line2 object and set multiple points that are not at the origin
2.select the Line2 object using TransformControls or OutlinePass
Code
constlineGeometry=newLineGeometry();lineGeometry.setPositions([1,1,1,2,2,2,2,0,2]);constlineMaterial=newLineMaterial({color: 0xff0000,linewidth: 1});constline=newLine2(lineGeometry,lineMaterial);scene.add(line);consttransCtrl=newTransformControls(camera,renderer.domElement);scene.add(transCtrl.getHelper());// controls' position is wrongtransCtrl.attach(line);
Description
The Line2 object's position itself is not adjusted; instead, it is implemented through the geometry.setPositions method. This causes discrepancies when using TransformControls to move it or applying OutlinePass for outlining, where the selected position does not align with the actual line.
Expected Outcome: Fix the issue, or provide the correct way to handle Line2 so that TransformControls defaults to selecting the bounding box center of the line segment.
Thanks.
Reproduction steps
1.create a Line2 object and set multiple points that are not at the origin
2.select the Line2 object using TransformControls or OutlinePass
Code
Live example
https://codesandbox.io/p/sandbox/5h3zmt
Screenshots
use with OutlinePass:

use with TransformControls:

Version
"three": "0.174.0"
Device
Desktop
Browser
Chrome
OS
MacOS
The text was updated successfully, but these errors were encountered: