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

fitToBox on a plane: how to prevent plane to get perpendicular to view? #496

Open
AmauryHamon opened this issue Apr 10, 2024 · 1 comment

Comments

@AmauryHamon
Copy link

AmauryHamon commented Apr 10, 2024

Describe the bug

Hi all, just discovering cameraControls.
I made a scene with planes positioned and rotated randomly
When clicking on a plane, I want to fit the plane intersected to fit only on its front or back side.

If the plane is rotated close to being perpendicular to the view, then it choose 'invisible sides'

Is there anything to prevent that?

To Reproduce

Steps to reproduce the behavior:

  1. Create a scene with a plane
  2. add mouse raycaster and click event to call the fitToBox on the intersected plane
  3. Move camera so plane is rotated close to being perpendicular to camera
  4. See error

Code

No response

Live example

Live example

Expected behavior

If mesh is a plane, only fit to front side (or back if double side is activated)

Screenshots or Video

No response

Device

Desktop

OS

MacOS

Browser

Chrome

@yomotsu
Copy link
Owner

yomotsu commented Apr 14, 2024

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

2 participants