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
added symmetric trackball controls #6096
Conversation
Thanks for this contribution. I have a few comments:
|
Agreed! I prefer this behaviour too! |
Thank you guys. I did this because since I worked in the past a lot with vtk/paraview I noticed that the way TrackballControls apply rotation is not suitable for camera controls in image-based modeling application.
|
Would you be willing to modify the existing |
Yes, of course. |
How do you rotate the scene around the view axis with this approach? With the old trackball, you click and drag the mouse along a big circle (one that touches the canvas at all four borders), giving you a pure rotation around the viewing axis (assuming you perfectly follow that virtual circle). With this new trackball, I would assume that you need to perform two or three separate mouse drags? By the way: if you're going to use a cube object for the example, how about uniquely coloring or texturing (e.g., like dice) its sides? That would make it easier to understand the rotation. |
Your observation is correct, you need to perform two or three different mouse drags. As I explained before this is a different approach. Better? It depends what do you need. For my purpose, it is better. |
Since, as suggested, I updated existing TrackballControls by adding a new feature ( cylindricalRotation ) instead of creating a separated control library as in this pull request, I close this and I will resubmit a new pull request. |
I was searching for threejs controls similar to vtk/paraview visualization software.
Using TrackballControls.js, if I click on the canvas in the center and I move the mouse along the y axis the camera rotates as expected. If I click on the canvas in a point which is distant from the center ( example on the right side of the cube ), the camera rotates in two directions and not only following my mouse movement.
See: http://jsfiddle.net/ugxbktLt/5/
I was expecting that the camera rotates following only the vector between the start point ( mousedown ) and end point generated by mouse movement and NOT considering the position of the start point.The simulated trackball is in the center of the canvas.
With SymmetricTrackballControls.js we can rotate camera independently from the position of the mouse on the canvas but considering only the mouse movement.
See:
http://stackoverflow.com/questions/28560130/threejs-trackball-controls-camera-rotation