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

Rotating in the Opposite Direction #24

Open
Goldbeener opened this issue Aug 29, 2024 · 4 comments
Open

Rotating in the Opposite Direction #24

Goldbeener opened this issue Aug 29, 2024 · 4 comments

Comments

@Goldbeener
Copy link

Hi There,
Thanks so much for working on this! It has been a huge help.

I've encountered an issue while using in my project. I'm trying to rotate a 3D object using spinControl, but the object rotates in the opposite direction. Specifically, when I swipe left, the object rotates to the right.

To troubleshoot, I created a minimal scene with just a single sphere, and I’ve ruled out potential causes like the version of Three.js or other factors. Could you help me understand what might be causing this behavior?

Thank you!

@Goldbeener
Copy link
Author

`const spinControl = new SpinControls(group, 50, camera, renderer.domElement);

spinControl.spinAxisConstraint = new THREE.Vector3(0, 1, 0);
spinControl.dampingFactor = 1.5;
spinControl.rotateSensitivity = 0.8; `

This is all the configuration I've done.

@Goldbeener
Copy link
Author

I’ve identified the cause of the issue: the rotateSensitivity property not only controls the rotation sensitivity but also determines the rotation direction. Setting this property to a negative value resolved the issue.
like this
spinControl.rotateSensitivity = -0.8

@PaulHax
Copy link
Owner

PaulHax commented Aug 29, 2024

Glad you solved it! I wonder if its just different expectations (my left is your right issue)? When you rotate the spheres on the demo site, are they (perceived =) "reversed"?

https://paulhax.github.io/spin-controls/

@Goldbeener
Copy link
Author

Glad you solved it! I wonder if its just different expectations (my left is your right issue)? When you rotate the spheres on the demo site, are they (perceived =) "reversed"?

https://paulhax.github.io/spin-controls/
thanks for reply.
on the demo site, the behavior meets expectations.
This is also my point of confusion. I created a very simple demo where I added a sphere and attach controls to it. The behavior only functions as expected when rotateSensitivity is negative.

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