Skip to content

Rotating via PivotControls flickers when axis is vertically/horizontally aligned #2406

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

Open
HugoLnx opened this issue Apr 3, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@HugoLnx
Copy link

HugoLnx commented Apr 3, 2025

Configuration I tested in my project:

  • three version: 0.174.0
  • @react-three/fiber version: 9.1.0
  • @react-three/drei version: 10.0.5
  • node version: 20.11.1
  • npm version: 10.1.0

Problem description:

PivotControls rotation flickers when perfectly aligned with horizontal or vertical.
Horizontal flickering demonstration
Horizontal

Relevant code:

Codesandbox to reproduce (Fork of one of the website examples): https://codesandbox.io/p/sandbox/multiple-views-with-uniform-controls-forked-x7jsq4

It's easier to reproduce if only the rotation is enabled

Suggested solution:

I think the rotation controls were implemented so the user can rotate around the object, but when the axis is aligned with horizontal/vertical that doesn't work properly. I suggest that it increases/decreases the angle based on the cursor movement parallel to the selected axis.

@HugoLnx HugoLnx added the bug Something isn't working label Apr 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant