-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
OrbitControls: Add keyRotateSpeed
.
#29988
OrbitControls: Add keyRotateSpeed
.
#29988
Conversation
This allows for setting a different speed of rotation when using the keyboard vs when using a mouse. Similar in approach to the existing keyPanSpeed.
@@ -92,6 +92,7 @@ class OrbitControls extends Controls { | |||
// Set to false to disable rotating | |||
this.enableRotate = true; | |||
this.rotateSpeed = 1.0; | |||
this.keyRotateSpeed = 10.0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you mind not changing the default value so we don't change the behavior?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy to change this default to 1 as it's now configurable. But .. The default of 1
is fairly slow when moving with the keyboard. Having a slightly faster speed, would be similar to keyPanSpeed
which is also higher when using the keyboard (7 vs 1).
The following recordings is me just holding shift+ down, so no repeated presses:
keyRotateSpeed = 1
key-rotate-1.mov
keyRotateSpeed = 10
key-rotate-10.mov
Let me know what you think, happy to go either way on this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Um, at least on my macMini the the rotate speed feels a bit too high.
TBH, I feel more safe if we don't touch the default value. Is that okay for you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worries at all, I pushed a commit which sets it to 1
keyRotateSpeed
.
* feat: Add keyRotateSpeed to OrbitControls This allows for setting a different speed of rotation when using the keyboard vs when using a mouse. Similar in approach to the existing keyPanSpeed. * fix: reduce keyRotateSpeed down to 1
Description
This allows for setting a different speed of rotation when using the keyboard vs when using a mouse. Similar in approach to the existing keyPanSpeed.