Skip to content

Fix issue with orbitControl rotating inversely on the X axis#2956

Closed
dekmm wants to merge 2 commits intoprocessing:masterfrom
dekmm:master
Closed

Fix issue with orbitControl rotating inversely on the X axis#2956
dekmm wants to merge 2 commits intoprocessing:masterfrom
dekmm:master

Conversation

@dekmm
Copy link
Copy Markdown
Contributor

@dekmm dekmm commented May 28, 2018

Addressing issue explained in #2930

@dekmm
Copy link
Copy Markdown
Contributor Author

dekmm commented May 29, 2018

Not sure if the inverted rotation was intented, but I would like to add an optional argument so the user can choose between normal and inverted rotation.

Copy link
Copy Markdown
Member

@kjhollen kjhollen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for this! let's file a separate issue for adding a parameter to orbitControl.

I think I understand the impulse to change this.width to this.height in the rotateX case (it does feel like it's more correct, technically), but what this means is that the user will rotate at different speeds in different directions. Is that the intent? How does it feel as a user?

@dekmm
Copy link
Copy Markdown
Contributor Author

dekmm commented May 31, 2018

I guess I never noticed the different rotation speeds since I tested the change on a canvas of equal width and height. Must've slipped my mind that I made the change.

I'm assuming the change isn't that drastic unless a user uses some weird resolution for the canvas such as 1000x100 or has OCD and these little inconsistencies drive him crazy :P but I'll test it out and change it back if necessary.

@kjhollen
Copy link
Copy Markdown
Member

@dekmm one context I was thinking of was using the browser's developer console, which usually results in a screen much wider than tall because the dev panel takes up the bottom half of the screen. I'm often doing this to run tests or debug.

@dekmm
Copy link
Copy Markdown
Contributor Author

dekmm commented May 31, 2018

@kjhollen good point. I probably would've missed this since my dev console is attached to the side and creates a square-like canvas. I'll revert the change.

@Spongman
Copy link
Copy Markdown
Contributor

I wonder if it behaves differently if the canvas is large vs if it is small? I think users might expect the turning rate to be related to the 'size' of the canvas, but also in a way that the horizontal & vertical turning rates are the same.

(I have a feeling that getting this exactly right would depend on inspecting the camera matrix, but on the other hand, I think that assuming a square pixel aspect ratio would probably be sufficient.)

@kjhollen
Copy link
Copy Markdown
Member

thanks for updating this. I just merged #2962 which included a similar fix + more features, so I'm going to close this, but the update was right on. :)

@kjhollen kjhollen closed this Jun 12, 2018
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

Successfully merging this pull request may close these issues.

3 participants