-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
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
TransformControls translate 2D pane gets invisible near canvas Border #24208
Comments
Can you make a JS fiddle reproducing the issue? |
https://threejs.org/examples/#misc_controls_transform Take the example, press c to switch to orthographic camera, zoom out using the mouse wheel. Than use the right mouse button to pan the camera. You will notice the the translation panes are disappearing while panning the camera and you get near canvas border. |
I'm afraid I can't reproduce the issue. Do you mind showing in a video what you are doing to produce the glitch? |
Couldn't reproduce the behavior but in extreme case, the objects can leave the camera frustum (clippig planes) Perhaps that is what deethee is seeing? |
For
Something like this may prevent the handles from disappearing unexpectedly. if ( this.camera.isOrthographicCamera ) {
this.camera.getWorldDirection( this.eye );
} else {
this.eye.copy( this.cameraPosition ).sub( this.worldPosition ).normalize();
} The frustum clipping may be a different issue... |
Interesting! Can you please describe the setup for reproduction? |
@Mugen87 I just followed the instructions in the above post. |
Now with running the demo in full screen I see the glitch, too. My first test in smaller window with different aspect ratio did not really show it. |
Sorry for replying late and thank you for uploading the video. It is hard to reproduce but zoom, orthographic camera, the distance from Canvas border, maybe orbit controls and widow size does matter to reproduce this issue. |
A camera zoom on a orthographic camera is somehow misleading since a zoom in describes a decrease in the camera angle. This is not the case on an orthographic camera since there is no camera angle. The orbit controls change the zoom. |
@deethee Applying @WestLangley's patch from #24208 (comment) definitely mitigates the issue for me. Can you give it a try? |
@Mugen87 There may still be a frustum far-pane clipping issue -- or is that considered a user error? |
I'm not sure the clipping issue can be properly addressed (apart from configuring the camera differently in the first place). |
This happens in combination with an Orthographic camera and Orbit Controls only.
I can see the effect in realtime. If I pan the camera the yellow pane disappears if translation handles are close to canvas border.
The rest of the handles work ok.
This happens in Three 124 but the latest version is buggy there also.
This is dependent on zoom also. If you are further out the pane is only visible in center of canvas. Is this related to clipping?
The text was updated successfully, but these errors were encountered: